88% meta-theme-colour

Code Review | Meta Theme Color Colour

WordPress plugin Meta Theme Color Colour scored 88% from 54 tests.

About plugin

  • Plugin page: meta-theme-colour
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Apr 26, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 18
  • Update frequency: every 12.6 days
  • Top authors: rkorebrits (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active / 3,345 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Meta Theme Color Colour
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.74 ▲0.0222.61 ▲2.96
Dashboard /wp-admin3.07 ▲0.0143.88 ▲0.81
Posts /wp-admin/edit.php3.12 ▲0.0146.06 ▲3.41
Add New Post /wp-admin/post-new.php5.43 ▲0.0083.15 ▼563.40
Media Library /wp-admin/upload.php3.01 ▲0.0032.22 ▼8.56
Meta Theme Colour /wp-admin/options-general.php?page=meta_theme_colour3.0127.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Meta Theme Color Colour
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲14616.08 ▲0.458.36 ▼0.0145.51 ▼8.88
Dashboard /wp-admin3,002 ▲686.49 ▲0.36137.43 ▲5.08102.64 ▼11.22
Posts /wp-admin/edit.php2,777 ▲383.00 ▲0.3168.26 ▲5.40102.62 ▲24.78
Add New Post /wp-admin/post-new.php1,694 ▲2218.83 ▲0.07370.69 ▲18.42104.13 ▼5.62
Media Library /wp-admin/upload.php1,845 ▲385.41 ▲0.40135.17 ▼17.82115.29 ▼6.47
Meta Theme Colour /wp-admin/options-general.php?page=meta_theme_colour1,2882.9067.4465.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/meta-theme-colour/autoloader.php
    • > /wp-content/plugins/meta-theme-colour/meta-theme-color.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/meta-theme-colour/views/settings-page.php:10

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === meta-theme-colour === )
The official readme.txt might help

meta-theme-colour/meta-theme-color.php 85% from 13 tests

Analyzing the main PHP file in "Meta Theme Color Colour" version 1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("meta-theme-colour.php" instead of "meta-theme-color.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected133 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP43080122
JavaScript1235
CSS1004
Markdown1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin