84% mobile-address-bar-color-changer

Code Review | Mobile address bar color changer

WordPress plugin Mobile address bar color changer scored84%from 54 tests.

About plugin

  • Plugin page: mobile-address-ba...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: May 16, 2017
  • Latest release: May 16, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wisedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Mobile address bar color changer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.93 ▼6.32
Dashboard /wp-admin3.32 ▼0.0245.15 ▼16.13
Posts /wp-admin/edit.php3.37 ▲0.0248.98 ▲0.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.73 ▼4.54
Media Library /wp-admin/upload.php3.25 ▲0.0236.14 ▼0.13
Mobile bar color changer /wp-admin/options-general.php?page=spacewisecoder_mabcc_display_settings_page3.2233.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Mobile address bar color changer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.33 ▼0.901.70 ▲0.0141.40 ▼2.02
Dashboard /wp-admin2,232 ▲505.10 ▼0.77115.13 ▲11.6841.56 ▼1.41
Posts /wp-admin/edit.php2,117 ▲282.32 ▲0.3140.25 ▲1.8435.22 ▲2.45
Add New Post /wp-admin/post-new.php1,531 ▲1223.26 ▼0.09604.16 ▼44.4832.50 ▼16.39
Media Library /wp-admin/upload.php1,414 ▲354.44 ▲0.1598.97 ▼5.2445.89 ▲4.17
Mobile bar color changer /wp-admin/options-general.php?page=spacewisecoder_mabcc_display_settings_page9322.4046.4828.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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)
Everything seems fine, however 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-address-bar-color-changer/addressbarcolor.php:14

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 93% from 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
4 plugin tags: mobile bar, changer, address bar, color

mobile-address-bar-color-changer/addressbarcolor.php 85% from 13 tests

This is the main PHP file of "Mobile address bar color changer" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mobile-address-bar-color-changer.php" instead of "addressbarcolor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181953
JavaScript1215

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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
No PNG images were found in this plugin