94% easy-bg

Code Review | Easy BG

WordPress plugin Easy BG scored 94% from 54 tests.

About plugin

  • Plugin page: easy-bg
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Sep 3, 2015
  • Latest release: Sep 3, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Redningsvesten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 659 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Easy BG
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.13 ▲12.97
Dashboard /wp-admin3.08 ▲0.0243.02 ▲7.62
Posts /wp-admin/edit.php3.13 ▲0.0242.11 ▼4.89
Add New Post /wp-admin/post-new.php5.43 ▼0.0089.41 ▼563.19
Media Library /wp-admin/upload.php3.02 ▲0.0232.16 ▲1.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy BG
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲15015.99 ▲0.5910.73 ▲0.4045.17 ▼5.35
Dashboard /wp-admin2,982 ▲515.90 ▼0.08132.58 ▼14.48129.05 ▲18.56
Posts /wp-admin/edit.php2,777 ▲382.71 ▲0.0063.24 ▼9.6786.66 ▼8.68
Add New Post /wp-admin/post-new.php1,689 ▲19118.69 ▼0.18366.84 ▼16.42115.78 ▲2.75
Media Library /wp-admin/upload.php1,771 ▼395.04 ▲0.02126.11 ▼17.67141.73 ▲19.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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)
Even though no errors were found, 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
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-bg/js/index.php
    • > /wp-content/plugins/easy-bg/imgs/index.php
    • > /wp-content/plugins/easy-bg/index.php

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: background color, color, background

easy-bg/easy-bg.php Passed 13 tests

Analyzing the main PHP file in "Easy BG" version 1.0.0
119 characters long description:
Easy BG is a plugin that enables you to change the body color of your Wordpress site without the need to edit the code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin931 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript213938836
PHP7112193
CSS1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/hv.png2.80KB7.32KB0.00%
imgs/menuicon.png3.55KB1.23KB▼ 65.31%
js/hs.png2.62KB7.54KB0.00%