79% wp-colored-coding

Code Review | WP Colored Coding

WordPress plugin WP Colored Coding scored79%from 54 tests.

About plugin

  • Plugin page: wp-colored-coding
  • Plugin version: 2014.08.19
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.0
  • WordPress version: 6.3.1
  • First release: Aug 14, 2012
  • Latest release: Sep 5, 2014
  • Number of updates: 12
  • Update frequency: every 63.3 days
  • Top authors: dnaber-de (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,073 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by WP Colored Coding
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1752.51 ▲11.66
Dashboard /wp-admin3.48 ▲0.1347.57 ▼12.61
Posts /wp-admin/edit.php3.60 ▲0.2447.70 ▼5.53
Add New Post /wp-admin/post-new.php6.08 ▲0.19106.87 ▲7.38
Media Library /wp-admin/upload.php3.40 ▲0.1736.11 ▲0.55

Server storage [IO: ▲0.32MB] [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: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Colored Coding
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲19313.55 ▼0.852.08 ▲0.1542.70 ▼2.39
Dashboard /wp-admin2,340 ▲1495.29 ▼0.60115.15 ▲3.0442.11 ▲3.14
Posts /wp-admin/edit.php2,231 ▲1422.46 ▲0.4653.09 ▲10.9836.82 ▼0.43
Add New Post /wp-admin/post-new.php6,527 ▲5,00821.86 ▼1.38836.66 ▲242.7084.18 ▲37.40
Media Library /wp-admin/upload.php1,528 ▲1464.71 ▲0.44100.32 ▲1.9944.14 ▲2.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-colored-coding/wp-colored-coding.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-colored-coding/php/class-Rainbow_API.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: rainbowjs, code samples, syntax highlighting

wp-colored-coding/wp-colored-coding.php Passed 13 tests

The main PHP script in "WP Colored Coding" version 2014.08.19 is automatically included on every request by WordPress
98 characters long description:
Managing Codeblocks independent from the WP Texteditor and use Rainbow.js for syntax highlighting.

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
No dangerous file extensions were detected2,636 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP3189473833
CSS13178111752
JavaScript7175522746
PO File369135192
Markdown1330113

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity38.67
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods615.38%
▷ Public methods3692.31%
▷ Protected methods37.69%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png71.22KB27.84KB▼ 60.91%
img/cc.png0.90KB1.00KB0.00%
screenshot-2.png20.24KB8.57KB▼ 57.64%
screenshot-3.png70.91KB30.66KB▼ 56.76%