94% media-checkboard

Code Review | Media Checkerboard

WordPress plugin Media Checkerboard scored 94% from 53 tests.

About plugin

  • Plugin page: media-checkboard
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2.2
  • WordPress version: 5.8.1
  • First release: Jun 9, 2015
  • Latest release: Dec 7, 2015
  • Number of updates: 12
  • Update frequency: every 16.7 days
  • Top authors: agm65 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 881 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Media Checkerboard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.79 ▲12.14
Dashboard /wp-admin3.07 ▲0.0252.05 ▲7.43
Posts /wp-admin/edit.php3.12 ▲0.0244.78 ▲3.12
Add New Post /wp-admin/post-new.php5.43 ▲0.01116.63 ▼1,056.04
Media Library /wp-admin/upload.php3.01 ▲0.0136.81 ▼3.83
Media Checkerboard /wp-admin/options-general.php?page=checkerboard_admin_display2.9829.73

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Media Checkerboard: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲10515.86 ▲0.388.73 ▲2.1148.01 ▲1.63
Dashboard /wp-admin2,970 ▲1205.89 ▲0.02137.84 ▲9.85104.93 ▲6.10
Posts /wp-admin/edit.php2,714 ▲112.69 ▲0.0065.12 ▼1.7790.05 ▲0.99
Add New Post /wp-admin/post-new.php1,662 ▼37618.33 ▼0.84366.80 ▲9.69111.24 ▲5.12
Media Library /wp-admin/upload.php1,779 ▲105.00 ▲0.00150.39 ▲4.49105.86 ▼4.61
Media Checkerboard /wp-admin/options-general.php?page=checkerboard_admin_display1,4593.1576.2766.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/media-checkboard/checkboard.php:25

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Checkerboard background for a PNG file), #2 (Configuration page), #3 (Color picker)
Please take inspiration from this readme.txt

media-checkboard/checkboard.php 92% from 13 tests

The main PHP script in "Media Checkerboard" version 1.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("media-checkboard.php" instead of "checkboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected72 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP116867
JavaScript1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.87KB9.99KB▼ 52.14%
screenshot-2.png13.16KB8.15KB▼ 38.03%
screenshot-3.png28.82KB13.11KB▼ 54.51%