94% addressbar-theme-color

Code Review | Addressbar Theme Color

WordPress plugin Addressbar Theme Color scored 94% from 54 tests.

About plugin

  • Plugin page: addressbar-theme-...
  • Plugin version: 0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.9.2
  • First release: Sep 30, 2017
  • Latest release: Oct 3, 2017
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: sir_gon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 672 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Addressbar Theme Color
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0351.35 ▲1.20
Dashboard /wp-admin3.44 ▲0.0431.82 ▼2.91
Posts /wp-admin/edit.php3.67 ▲0.0335.23 ▼3.60
Add New Post /wp-admin/post-new.php6.93 ▼0.0790.16 ▼1,194.16
Media Library /wp-admin/upload.php3.32 ▲0.0325.23 ▼0.51
Addressbar Theme Color /wp-admin/themes.php?page=addressbar-theme-color3.2922.70

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Addressbar Theme Color
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,796 ▲4216.14 ▲0.485.75 ▼0.482.27 ▼0.69
Dashboard /wp-admin2,893 ▲326.15 ▼0.03117.24 ▼16.13155.57 ▼10.54
Posts /wp-admin/edit.php2,696 ▲23.23 ▼0.0062.78 ▼2.63140.44 ▼3.28
Add New Post /wp-admin/post-new.php1,763 ▲7322.74 ▲1.08418.98 ▼19.44159.32 ▲3.30
Media Library /wp-admin/upload.php1,706 ▲85.51 ▼0.03139.42 ▼6.18189.35 ▲10.01
Addressbar Theme Color /wp-admin/themes.php?page=addressbar-theme-color9982.4253.82126.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addressbar-theme-color/options.php:118
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addressbar-theme-color/options.php:118

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
4 plugin tags: theme, header, html5, mobile

addressbar-theme-color/addressbar_theme_color.php 85% from 13 tests

This is the main PHP file of "Addressbar Theme Color" version 0.3, 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: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("addressbar-theme-color.php" instead of "addressbar_theme_color.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin105 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2244794
Markdown13011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin