84% addressbar-theme-color

Code Review | Addressbar Theme Color

WordPress plugin Addressbar Theme Color scored84%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: 6.3.1
  • 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 /917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Addressbar Theme Color
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0830.83 ▼9.72
Dashboard /wp-admin3.32 ▼0.0346.71 ▼20.43
Posts /wp-admin/edit.php3.37 ▲0.0147.19 ▼1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.90 ▼19.11
Media Library /wp-admin/upload.php3.24 ▲0.0135.48 ▼0.97
Addressbar Theme Color /wp-admin/themes.php?page=addressbar-theme-color3.2133.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Addressbar Theme Color
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.22 ▼0.181.69 ▼0.2946.46 ▲1.10
Dashboard /wp-admin2,199 ▲225.57 ▼0.1392.05 ▲1.1839.69 ▼0.91
Posts /wp-admin/edit.php2,101 ▲12.01 ▲0.0039.03 ▼2.8140.19 ▲2.50
Add New Post /wp-admin/post-new.php1,531 ▼423.21 ▲4.97667.24 ▲3.6665.27 ▼5.81
Media Library /wp-admin/upload.php1,407 ▲104.25 ▲0.0496.83 ▼6.9643.62 ▼4.82
Addressbar Theme Color /wp-admin/themes.php?page=addressbar-theme-color7912.0327.0433.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: mobile, theme, header, html5

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

The entry point to "Addressbar Theme Color" version 0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("addressbar-theme-color.php" instead of "addressbar_theme_color.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected105 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
All good! No complexity issues found
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
PNG images were not found in this plugin