84% wp-color-browser

Code Review | WP Color Browser

WordPress plugin WP Color Browser scored84%from 54 tests.

About plugin

  • Plugin page: wp-color-browser
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 6.3.1
  • First release: May 9, 2016
  • Latest release: May 9, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: CarlosRios (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,595 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.06ms] Passed 4 tests

This is a short check of server-side resources used by WP Color Browser
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.43 ▼4.11
Dashboard /wp-admin3.34 ▲0.0043.65 ▼16.69
Posts /wp-admin/edit.php3.40 ▲0.0449.35 ▲0.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.69 ▼11.71
Media Library /wp-admin/upload.php3.27 ▲0.0435.53 ▲2.96
Color Browser /wp-admin/themes.php?page=wp_color_browser3.2441.03

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

WP Color Browser: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7814.48 ▲0.111.99 ▲0.1842.37 ▲2.35
Dashboard /wp-admin2,207 ▲154.81 ▼0.13109.04 ▲1.2343.46 ▼0.63
Posts /wp-admin/edit.php2,096 ▲42.02 ▼0.0238.17 ▼7.5536.48 ▲1.72
Add New Post /wp-admin/post-new.php1,541 ▲523.17 ▼0.14638.96 ▲11.5164.87 ▼0.57
Media Library /wp-admin/upload.php1,386 ▲14.20 ▲0.0196.28 ▼1.6442.08 ▼3.07
Color Browser /wp-admin/themes.php?page=wp_color_browser9572.3754.6336.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-color-browser/includes/class-wpcb-settings.php:25

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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: google chrome tabs, color chrome, chrome, color browser, google chrome

wp-color-browser/wp-color-browser.php Passed 13 tests

The main PHP script in "WP Color Browser" version 1.0 is automatically included on every request by WordPress
50 characters long description:
Change the color of the browser on mobile devices.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected306 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP454156173
CSS10086
JavaScript141030
Markdown18017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.36MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/settings.png15.05KB7.46KB▼ 50.42%
assets/images/icons.png2.17KB0.78KB▼ 64.03%
assets/images/preview.png322.65KB158.50KB▼ 50.88%
assets/images/status-bar-black.png13.47KB7.12KB▼ 47.11%
assets/images/status-bar-translucent.png15.36KB7.83KB▼ 49.05%