74% geocache-stat-bar-widget

Code Review | Geocache Stat Bar Widget

WordPress plugin Geocache Stat Bar Widget scored74%from 54 tests.

About plugin

  • Plugin page: geocache-stat-bar...
  • Plugin version: 0.91.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2009
  • Latest release: Oct 1, 2017
  • Number of updates: 11
  • Update frequency: every 283.5 days
  • Top authors: tiogaplanet (63.64%)brandondove (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,459 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.91MB] [CPU: ▼61.75ms] Passed 4 tests

Analyzing server-side resources used by Geocache Stat Bar Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.60 ▼40.96
Dashboard /wp-admin2.10 ▼1.215.94 ▼50.29
Posts /wp-admin/edit.php2.10 ▼1.266.64 ▼48.86
Add New Post /wp-admin/post-new.php2.10 ▼3.796.04 ▼106.90
Media Library /wp-admin/upload.php2.10 ▼1.135.57 ▼34.13

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Geocache Stat Bar Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.131.69 ▲0.0247.84 ▲4.00
Dashboard /wp-admin2,198 ▲215.62 ▼0.0684.78 ▼36.8038.56 ▼19.70
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0637.06 ▲1.8633.79 ▼2.20
Add New Post /wp-admin/post-new.php1,526 ▼1122.78 ▲4.64653.47 ▲31.2053.12 ▼16.89
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.04101.74 ▼4.1142.41 ▼0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocache-stat-bar-widget/geocache-stat-bar.php:107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
4 plugin tags: badge, widget, geocache, stats

geocache-stat-bar-widget/geocache-stat-bar.php 92% from 13 tests

The main file in "Geocache Stat Bar Widget" v. 0.91.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("geocache-stat-bar-widget.php" instead of "geocache-stat-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191773

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin