10% foursquare-venue

Code Review | Foursquare Venue

WordPress plugin Foursquare Venue scored 10% from 54 tests.

About plugin

  • Plugin page: foursquare-venue
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 5.8.1
  • First release: Nov 21, 2010
  • Latest release: Jul 20, 2014
  • Number of updates: 18
  • Update frequency: every 74.3 days
  • Top authors: sutherlandboswell (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 11,498 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/foursquare-venue/php/widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; Foursquare_Venue_Widget has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼204.51ms] Passed 4 tests

This is a short check of server-side resources used by Foursquare Venue
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.93 ▼0.796.13 ▼18.55
Dashboard /wp-admin1.95 ▼1.1013.22 ▼31.40
Posts /wp-admin/edit.php1.95 ▼1.169.73 ▼39.67
Add New Post /wp-admin/post-new.php1.95 ▼3.486.60 ▼720.37
Media Library /wp-admin/upload.php1.95 ▼1.056.01 ▼26.61
Foursquare Venue /wp-admin/options-general.php?page=foursquare_venue1.955.43

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options
foursquare_venue
widget_foursquare_venue

Browser metrics Passed 4 tests

Foursquare Venue: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲10715.83 ▲0.328.65 ▲0.1151.91 ▼1.06
Dashboard /wp-admin2,977 ▲466.14 ▲0.08145.44 ▼6.14115.31 ▼0.08
Posts /wp-admin/edit.php2,749 ▲102.71 ▲0.0281.54 ▲16.8197.84 ▲3.01
Add New Post /wp-admin/post-new.php1,690 ▲10918.48 ▼2.06385.07 ▼20.39114.31 ▲2.19
Media Library /wp-admin/upload.php1,820 ▲135.08 ▲0.07178.53 ▲17.39126.50 ▼15.87
Foursquare Venue /wp-admin/options-general.php?page=foursquare_venue1,2112.3668.6295.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/foursquare-venue/php/widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; Foursquare_Venue_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_foursquare_venue

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=foursquare_venue
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/foursquare-venue/php/widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; Foursquare_Venue_Widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=foursquare_venue
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Foursquare_Venue_Widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/foursquare-venue/php/widget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/foursquare-venue/php/widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: venue, widget, location, foursquare, social networking

foursquare-venue/foursquare-venue.php Passed 13 tests

The primary PHP file in "Foursquare Venue" version 3.0.2 is used by WordPress to initiate all plugin functionality
101 characters long description:
Display your venue's foursquare stats in an easy-to-use widget or with the [venue id=3945] shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected541 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP384168484
CSS17039
JavaScript15018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity32.67
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin