58% wp-geocaster

Code Review | WP GeoCaster

WordPress plugin WP GeoCaster scored58%from 54 tests.

About plugin

  • Plugin page: wp-geocaster
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 30, 2013
  • Latest release: Jun 3, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: geoklix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /819 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼39.51ms] Passed 4 tests

An overview of server-side resources used by WP GeoCaster
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.20 ▼8.21
Dashboard /wp-admin3.05 ▼0.2923.12 ▼38.41
Posts /wp-admin/edit.php3.05 ▼0.3029.11 ▼24.77
Add New Post /wp-admin/post-new.php3.05 ▼2.8321.70 ▼83.12
Media Library /wp-admin/upload.php3.05 ▼0.1724.03 ▼11.72

Server storage [IO: ▲0.05MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 2 new tables, 7 new options
New tables
wp_wpgeoc_countries
wp_wpgeoc_cities
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
wpgeoc_db_version
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP GeoCaster
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.93 ▼0.335.24 ▲3.3139.70 ▼1.92
Dashboard /wp-admin2,244 ▲564.88 ▼1.00115.78 ▲14.1842.40 ▼0.84
Posts /wp-admin/edit.php2,124 ▲322.03 ▲0.0539.57 ▼1.6134.40 ▼0.89
Add New Post /wp-admin/post-new.php1,546 ▲1523.21 ▲4.98673.48 ▲64.9468.08 ▲12.95
Media Library /wp-admin/upload.php1,423 ▲384.26 ▲0.0698.97 ▼8.5040.84 ▼4.36
Cities /wp-admin/wp-geocaster.php?page=wpgeoc-cities260.440.1414.00
WP GeoCaster /wp-admin/wp-geocaster.php260.440.125.89
Countries /wp-admin/wp-geocaster.php?page=wpgeoc-countries260.440.088.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-geocaster/wp-geocaster.php+117
    Function create_function() is deprecated
  • Zombie tables detected upon uninstall: 2 tables
    • wp_wpgeoc_cities
    • wp_wpgeoc_countries
  • The uninstall procedure has failed, leaving 7 options in the database
    • wpgeoc_db_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-geocaster/pages/countries.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wp-geocaster/wp-geocaster.php:29
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-geocaster/pages/cities.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-geocaster/pages/frontpage.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-geocaster/wpgeocClasses.php on line 494
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-geocaster/wpgeocClasses.php on line 494
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-geocaster/install.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-geocaster/wpgeocClasses.php on line 494
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-geocaster/install.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/wp-geocaster.php?page=wpgeoc-cities
    • > Network (severe)
    wp-admin/wp-geocaster.php?page=wpgeoc-cities - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/wp-geocaster.php
    • > Network (severe)
    wp-admin/wp-geocaster.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/wp-geocaster.php?page=wpgeoc-countries
    • > Network (severe)
    wp-admin/wp-geocaster.php?page=wpgeoc-countries - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: geocaster, geolocate, wordpress

wp-geocaster/wp-geocaster.php 92% from 13 tests

The main file in "WP GeoCaster" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,234 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72021741,092
CSS1312141
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.88
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/enabled.png0.50KB0.35KB▼ 29.16%
images/disabled.png0.57KB0.43KB▼ 25.00%