79% addressbar-meta-theme-color

Code Review | Addressbar Meta Theme Color

WordPress plugin Addressbar Meta Theme Color scored 79% from 54 tests.

About plugin

  • Plugin page: addressbar-meta-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 5.9.2
  • First release: Aug 18, 2017
  • Latest release: Aug 18, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: williampatton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Addressbar Meta Theme Color
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0554.18 ▲4.19
Dashboard /wp-admin3.42 ▲0.0133.71 ▼0.61
Posts /wp-admin/edit.php3.66 ▲0.0138.03 ▲0.53
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.31 ▼1,167.72
Media Library /wp-admin/upload.php3.31 ▲0.0126.11 ▲1.04
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php6.1756.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 2 new options
New WordPress options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Addressbar Meta Theme Color
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,780 ▲5816.16 ▲0.496.16 ▼0.282.38 ▼0.02
Dashboard /wp-admin2,897 ▲436.09 ▼0.02119.97 ▼14.63154.65 ▼3.32
Posts /wp-admin/edit.php2,693 ▲213.24 ▼0.0061.03 ▼3.21137.50 ▼3.09
Add New Post /wp-admin/post-new.php1,720 ▼3221.18 ▲0.13438.28 ▲7.13155.41 ▲1.20
Media Library /wp-admin/upload.php1,703 ▲55.52 ▲0.02151.29 ▲12.92194.59 ▲8.62
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,48920.11499.25175.14

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
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/addressbar-meta-theme-color/addressbar-meta-theme-color.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
No tags were found

addressbar-meta-theme-color/addressbar-meta-theme-color.php Passed 13 tests

This is the main PHP file of "Addressbar Meta Theme Color" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
83 characters long description:
This plugin allows to to set a color for the addressbar in chrome and opera mobile.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected57 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2155157

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin