10% jb-common

Code Review | JB Common

WordPress plugin JB Common scored10%from 54 tests.

About plugin

  • Plugin page: jb-common
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Apr 5, 2013
  • Number of updates: 18
  • Update frequency: N/A
  • Top authors: JoanBotella (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /995 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/jb-common/lib/widgets/bio.php+114
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼49.53ms] Passed 4 tests

An overview of server-side resources used by JB Common
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.88 ▼35.85
Dashboard /wp-admin2.15 ▼1.157.54 ▼41.44
Posts /wp-admin/edit.php2.15 ▼1.208.20 ▼36.15
Add New Post /wp-admin/post-new.php2.15 ▼3.739.63 ▼84.67
Media Library /wp-admin/upload.php2.15 ▼1.088.01 ▼30.06
Show Log /wp-admin/admin.php?page=jbcommon-show-log2.158.80
Info /wp-admin/admin.php?page=jbcommon-info2.158.04
Configuration /wp-admin/admin.php?page=jbcommon-configuration2.157.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 54 new files
Database: no new tables, 34 new options
New WordPress options
jbcommon_email_from_address
jbcommon_log_level_display
widget_recent-posts
jbcommon_log_level_file
jbcommon_menu_position
jbcommon_debug_mode
jbcommon_email_from_name
jbcommon_maintenance_key
widget_recent-comments
jbcommon_maintenance_url
...

Browser metrics Passed 4 tests

Checking browser requirements for JB Common
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.23 ▼1.011.83 ▲0.0840.84 ▼5.05
Dashboard /wp-admin2,270 ▲795.89 ▲1.00104.97 ▼6.9176.21 ▲31.37
Posts /wp-admin/edit.php2,153 ▲672.06 ▲0.0039.86 ▲2.3534.78 ▲1.19
Add New Post /wp-admin/post-new.php1,570 ▲3723.50 ▲0.26697.79 ▼22.2456.52 ▲1.10
Media Library /wp-admin/upload.php1,449 ▲614.13 ▼0.0899.78 ▼17.1840.78 ▼6.17
Show Log /wp-admin/admin.php?page=jbcommon-show-log8362.0124.3526.30
Info /wp-admin/admin.php?page=jbcommon-info2,5322.0228.2853.71
Configuration /wp-admin/admin.php?page=jbcommon-configuration2,0891.7325.7836.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/jb-common/lib/widgets/bio.php+114
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 34 options in the database
    • jbcommon_meta_tag_keywords
    • jbcommon_debug_mode
    • widget_recent-comments
    • jbcommon_favicon_mime
    • jbcommon_log_file
    • jbcommon_footer
    • jbcommon_email_from_address
    • jbcommon_show_validator_link
    • jbcommon_meta_tag_author
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jbcommon-configuration
    • > Deprecated in wp-content/plugins/jb-common/lib/widgets/feeds.php+220
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=jbcommon-info
    • > Notice in wp-content/plugins/jb-common/lib/admin/info.php+46
    Undefined variable: encrypted

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/jb-common/cfg/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/jb-common/lib/deployment.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jb-common/lib/widgets/feeds.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/jb-common/cfg/info.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jb-common/jb-common.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jb-common/lib/widgets/bio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/jb-common/lib/shortcodes.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jb-common/lib/hooks.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in jb-common/assets to your readme.txt
  • Tags: You are using too many tags: 22 tag instead of maximum 10
The official readme.txt might help

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

The entry point to "JB Common" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin3,824 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP188533053,055
PO File1227330458
Sass4860309
CSS2002

PHP code Passed 2 tests

This is a very shot 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.31
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods3970.91%
▷ Protected methods1629.09%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants50
▷ Global constants50100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.83MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png126.75KB49.38KB▼ 61.04%
img/rss.oxygen-team.gnu_gpl.16x16.png0.58KB0.66KB0.00%
assets/screenshot-2.png172.58KB65.65KB▼ 61.96%
assets/screenshot-1.png366.33KB134.01KB▼ 63.42%
assets/banner-772x250.png19.75KB16.86KB▼ 14.62%