94% sites-coloring

Code Review | Sites coloring

WordPress plugin Sites coloring scored 94% from 54 tests.

About plugin

  • Plugin page: sites-coloring
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 5.8.1
  • First release: Oct 13, 2020
  • Latest release: Oct 14, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: babylonix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 132 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
Installer ran successfully

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

This is a short check of server-side resources used by Sites coloring
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.66 ▼0.0623.50 ▲3.33
Dashboard /wp-admin3.06 ▲0.0141.35 ▼2.40
Posts /wp-admin/edit.php3.12 ▲0.0143.86 ▲0.34
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.17 ▼573.53
Media Library /wp-admin/upload.php3.01 ▲0.0031.01 ▼0.05

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Sites coloring: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,584 ▲98916.70 ▲1.1028.26 ▲17.4870.95 ▲26.56
Dashboard /wp-admin2,970 ▲365.92 ▼0.11132.91 ▼30.67109.67 ▼5.96
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0162.70 ▼2.1888.38 ▼4.03
Add New Post /wp-admin/post-new.php1,672 ▲5718.86 ▼3.09360.54 ▲87.46104.07 ▼3.92
Media Library /wp-admin/upload.php1,810 ▲35.05 ▼0.08145.70 ▼7.42119.62 ▲8.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sites-coloring/coloring.php on line 90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_super_admin() in wp-content/plugins/sites-coloring/coloring.php:93
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sites-coloring/coloring.php on line 90
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/sites-coloring/coloring.php on line 90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (This screen shot description corresponds to screenshot-1.png. Note that the screenshot is taken from)
Please take inspiration from this readme.txt

sites-coloring/coloring.php 92% from 13 tests

Analyzing the main PHP file in "Sites coloring" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sites-coloring.php" instead of "coloring.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,928 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33311611,666
CSS1192177
PHP112985

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/screenshot-1.png49.55KB18.24KB▼ 63.20%
screenshot/screenshot-2.png47.02KB17.72KB▼ 62.32%
screenshot/screenshot-3.png49.57KB18.83KB▼ 62.02%