90% responsive-thickbox

Code Review | Responsive Thickbox

WordPress plugin Responsive Thickbox scored90%from 54 tests.

About plugin

  • Plugin page: responsive-thickbox
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.9
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 18
  • Update frequency: every 22.1 days
  • Top authors: bseddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.20ms] Passed 4 tests

Analyzing server-side resources used by Responsive Thickbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3544.21 ▼0.99
Dashboard /wp-admin3.76 ▲0.4649.86 ▲2.71
Posts /wp-admin/edit.php3.88 ▲0.5255.05 ▲7.66
Add New Post /wp-admin/post-new.php6.36 ▲0.4790.26 ▼8.26
Media Library /wp-admin/upload.php3.68 ▲0.4540.45 ▲1.74
Responsive Thickbox /wp-admin/tools.php?page=responsive_thickbox_settings3.6638.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
responsive_thickbox_settings
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
responsive_thickbox_version
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Thickbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲16413.77 ▼0.5116.28 ▲14.3743.39 ▼0.35
Dashboard /wp-admin2,213 ▲455.79 ▲0.0790.72 ▼5.5238.50 ▼3.73
Posts /wp-admin/edit.php2,120 ▲202.28 ▲0.2736.69 ▼0.8828.05 ▼5.58
Add New Post /wp-admin/post-new.php1,542 ▲1623.16 ▲0.15654.44 ▼3.4350.67 ▼1.49
Media Library /wp-admin/upload.php1,418 ▲184.28 ▼0.02101.20 ▼6.4442.20 ▲0.05
Responsive Thickbox /wp-admin/tools.php?page=responsive_thickbox_settings1,1741.9333.9642.53

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 did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • responsive_thickbox_settings
    • responsive_thickbox_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: popup, design, responsive, thickbox, video

responsive-thickbox/responsive-thickbox.php Passed 13 tests

The main file in "Responsive Thickbox" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
79 characters long description:
Allow the thickbox to adjust its size based on the width of the browser window.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,432 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP94226711,581
JavaScript210849711
CSS2190140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity38.75
▷ Minimum class complexity3.00
▷ Maximum class complexity78.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods58
▷ Static methods11.72%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
Constants20
▷ Global constants20100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/responsive-thickbox-630x210.png37.89KB18.39KB▼ 51.47%
assets/images/responsive-thickbox.png62.71KB27.64KB▼ 55.93%
assets/screenshot-1.png76.19KB36.57KB▼ 52.00%