62% maxi-bg

Code Review | Maxi BG

WordPress plugin Maxi BG scored62%from 54 tests.

About plugin

  • Plugin page: maxi-bg
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Jun 29, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: jelontok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /975 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼41.37ms] Passed 4 tests

An overview of server-side resources used by Maxi BG
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6913.98 ▼28.21
Dashboard /wp-admin2.82 ▼0.4916.91 ▼31.28
Posts /wp-admin/edit.php2.82 ▼0.5418.08 ▼29.10
Add New Post /wp-admin/post-new.php2.82 ▼3.0716.75 ▼76.90
Media Library /wp-admin/upload.php2.82 ▼0.4116.42 ▼14.42
Add Slideshow Background /wp-admin/post-new.php?post_type=maxibgslideshow2.8216.94
Maxi BG /wp-admin/edit.php?post_type=maxibgslideshow2.8216.22

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Maxi BG
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲31715.67 ▲1.305.19 ▲3.4540.80 ▼0.30
Dashboard /wp-admin2,373 ▲1856.37 ▲1.44133.09 ▲23.9742.75 ▲0.63
Posts /wp-admin/edit.php2,274 ▲1853.33 ▲1.2954.72 ▲18.3031.51 ▼4.41
Add New Post /wp-admin/post-new.php1,573 ▲4023.30 ▼0.14604.20 ▼78.7335.01 ▼16.88
Media Library /wp-admin/upload.php1,409 ▲304.16 ▼0.0185.50 ▼14.4340.72 ▼4.62
Add Slideshow Background /wp-admin/post-new.php?post_type=maxibgslideshow1,7013.9887.6439.49
Maxi BG /wp-admin/edit.php?post_type=maxibgslideshow1,2513.2449.9029.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/maxi-bg/lib/cmb/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=maxibgslideshow
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/maxi-bg/lib/cmb/init.php+746
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/maxi-bg/lib/cmb/tests/phpunit/includes/bootstrap.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/maxi-bg/lib/cmb/init.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/maxi-bg/lib/cmb/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maxi-bg/maxibg.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/maxi-bg/lib/cmb/example-functions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: cycle, maximage, fullscreen, slideshow, background

maxi-bg/maxibg.php 92% from 13 tests

The main PHP file in "Maxi BG" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("maxi-bg.php" instead of "maxibg.php")

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 detected5,351 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73134252,249
PHP105821,1192,148
CSS36121541
Markdown3880288
Bourne Shell115459
JSON10031
YAML15018
XML10117

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.52
Average class complexity57.14
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods134
▷ Static methods3425.37%
▷ Public methods13298.51%
▷ Protected methods21.49%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/cmb/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
lib/cmb/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
lib/cmb/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
lib/cmb/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
lib/cmb/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%