84% jb-shortener

Code Review | JB Shortener

WordPress plugin JB Shortener scored 84% from 54 tests.

About plugin

  • Plugin page: jb-shortener
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 6.3.1
  • First release: Nov 29, 2011
  • Latest release: Aug 20, 2012
  • Number of updates: 30
  • Update frequency: every 8.8 days
  • Top authors: betzster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.97ms] Passed 4 tests

Analyzing server-side resources used by JB Shortener
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.51 ▼4.59
Dashboard /wp-admin3.32 ▲0.0147.61 ▼2.22
Posts /wp-admin/edit.php3.37 ▲0.0147.82 ▲5.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.93 ▼3.10
Media Library /wp-admin/upload.php3.24 ▲0.0134.94 ▲2.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

JB Shortener: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.24 ▼0.981.75 ▼0.0741.86 ▼0.77
Dashboard /wp-admin2,209 ▲215.84 ▲0.9598.95 ▼19.1441.21 ▼7.34
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0540.20 ▲3.2236.62 ▲4.33
Add New Post /wp-admin/post-new.php1,550 ▲2118.22 ▲0.02598.84 ▲1.2458.09 ▲4.32
Media Library /wp-admin/upload.php1,397 ▲94.23 ▲0.00101.27 ▼3.3243.72 ▼1.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jb-shortener/jb-shortener.php:14
    • > PHP Notice
      Trying to get property 'base_prefix' of non-object in wp-content/plugins/jb-shortener/sunrise.php on line 6
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/jb-shortener/sunrise.php on line 6
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/jb-shortener/sunrise.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined method stdClass::escape() in wp-content/plugins/jb-shortener/sunrise.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: twitter, shorturl

jb-shortener/jb-shortener.php 92% from 13 tests

The primary PHP file in "JB Shortener" version 1.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23743145

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin