84% wp-rainbow-hilite

Code Review | WordPress Rainbow Hilite

WordPress plugin WordPress Rainbow Hilite scored84%from 54 tests.

About plugin

  • Plugin page: wp-rainbow-hilite
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Mar 9, 2020
  • Number of updates: 20
  • Update frequency: every 101.9 days
  • Top authors: podpirate (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /4,346 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.18ms] Passed 4 tests

Analyzing server-side resources used by WordPress Rainbow Hilite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.21 ▼0.78
Dashboard /wp-admin3.35 ▲0.0043.84 ▼17.83
Posts /wp-admin/edit.php3.46 ▲0.1050.71 ▲3.40
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.77 ▼17.49
Media Library /wp-admin/upload.php3.27 ▲0.0437.23 ▲4.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Rainbow Hilite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.80 ▲0.453.04 ▲1.4237.33 ▼0.72
Dashboard /wp-admin2,194 ▲205.51 ▼0.0285.96 ▲1.5340.28 ▼1.11
Posts /wp-admin/edit.php2,102 ▲21.97 ▼0.0534.65 ▲1.1933.29 ▲0.98
Add New Post /wp-admin/post-new.php1,367 ▼15916.61 ▼6.64557.80 ▼110.4049.37 ▼11.68
Media Library /wp-admin/upload.php1,402 ▼14.16 ▼0.02100.51 ▲2.5941.38 ▼4.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RainbowHilite\\plugin_dir_path() in wp-content/plugins/wp-rainbow-hilite/wp-rainbow.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/wp-rainbow-hilite/uninstall.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Core\\Singleton' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Admin/TinyMce/TinyMce.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Core\\Singleton' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Core/Core.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Settings\\Settings' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Settings/SettingsWriting.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Admin\\TinyMce\\TinyMce' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Admin/TinyMce/Rainbow/Rainbow.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Core\\Singleton' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Settings/Settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RainbowHilite\\Core\\Singleton' not found in wp-content/plugins/wp-rainbow-hilite/include/RainbowHilite/Admin/Admin.php:7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: syntax highlighting, rainbow, code

wp-rainbow-hilite/wp-rainbow.php 92% from 13 tests

The main file in "WordPress Rainbow Hilite" v. 2.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-rainbow-hilite.php" instead of "wp-rainbow.php")

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
There were no executable files found in this plugin2,510 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript481807742,057
PHP10200226428
CSS254425

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes7
▷ Abstract classes342.86%
▷ Concrete classes457.14%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods2873.68%
▷ Protected methods718.42%
▷ Private methods37.89%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin