84% kevinjohn-gallagher-pure-web-brilliants-javascript-control

Code Review | Pure Web Brilliant's JavaScript Control

WordPress plugin Pure Web Brilliant's JavaScript Control scored84%from 54 tests.

About plugin

  • Plugin page: kevinjohn-gallagh...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Jun 19, 2012
  • Latest release: Jul 9, 2012
  • Number of updates: 6
  • Update frequency: every 3.5 days
  • Top authors: kevinjohngallagher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.17ms] Passed 4 tests

Analyzing server-side resources used by Pure Web Brilliant's JavaScript Control
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.91 ▼1.34
Dashboard /wp-admin3.36 ▲0.0246.26 ▼14.20
Posts /wp-admin/edit.php3.41 ▲0.0650.92 ▲2.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0680.85 ▼7.77
Media Library /wp-admin/upload.php3.29 ▲0.0637.41 ▲4.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pure Web Brilliant's JavaScript Control
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.75 ▲0.371.83 ▼0.0344.80 ▲2.58
Dashboard /wp-admin2,211 ▲195.80 ▲0.84102.69 ▼7.7238.87 ▼0.79
Posts /wp-admin/edit.php2,095 ▲91.99 ▼0.0438.26 ▲2.6437.28 ▲5.01
Add New Post /wp-admin/post-new.php1,590 ▲6722.04 ▲1.07665.01 ▼51.9035.76 ▼23.42
Media Library /wp-admin/upload.php1,394 ▲64.23 ▲0.0397.81 ▼11.9841.04 ▼4.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kevinjohn-gallagher-pure-web-brilliants-javascript-control/kevinjohn_gallagher__javascript_control.php

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No tags were found

kevinjohn-gallagher-pure-web-brilliants-javascript-control/kevinjohn_gallagher__javascript_control.php 92% from 13 tests

The principal PHP file in "Pure Web Brilliant's JavaScript Control" v. 2.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kevinjohn-gallagher-pure-web-brilliants-javascript-control.php" instead of "kevinjohn_gallagher__javascript_control.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,558 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript200481757
PHP1211137419
CSS133150382

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods743.75%
▷ Protected methods00.00%
▷ Private methods956.25%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_javascripts/jquery-ui/jquery-ui-1.8.20/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.25KB0.15KB▼ 39.62%
_javascripts/jquery-ui/jquery-ui-1.8.20/css/ui-lightness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
_javascripts/jquery-ui/jquery-ui-1.8.20/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png0.12KB0.16KB0.00%
_javascripts/jquery-ui/jquery-ui-1.8.20/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.13KB0.18KB0.00%
_javascripts/jquery-ui/jquery-ui-1.8.20/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%