74% global-content

Code Review | Global Content by BusinessBox

WordPress plugin Global Content by BusinessBox scored74%from 54 tests.

About plugin

  • Plugin page: global-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: May 23, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: businessbox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,236 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.49ms] Passed 4 tests

An overview of server-side resources used by Global Content by BusinessBox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.22 ▼4.31
Dashboard /wp-admin3.31 ▼0.0352.80 ▼14.16
Posts /wp-admin/edit.php3.37 ▲0.0152.43 ▲4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.29 ▼9.13
Media Library /wp-admin/upload.php3.24 ▲0.0138.21 ▲1.66
All Variables /wp-admin/admin.php?page=global-content/global-content-admin-list.php3.2836.48
Add New /wp-admin/admin.php?page=global-content/global-content-admin-new.php3.2739.09
Edit /wp-admin/admin.php?page=global-content/global-content-admin-edit.php3.2740.79

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_globalcontentbybb
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Global Content by BusinessBox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9114.82 ▲0.481.90 ▲0.2639.71 ▼5.66
Dashboard /wp-admin2,232 ▲525.85 ▲0.2194.49 ▲1.1385.96 ▲42.39
Posts /wp-admin/edit.php2,159 ▲592.21 ▲0.2541.96 ▲5.2351.14 ▲17.99
Add New Post /wp-admin/post-new.php1,576 ▲4823.20 ▲0.26668.95 ▼27.4437.53 ▼23.60
Media Library /wp-admin/upload.php1,458 ▲614.60 ▲0.37121.71 ▲5.4594.27 ▲47.31
All Variables /wp-admin/admin.php?page=global-content/global-content-admin-list.php1,0902.5235.0828.98
Add New /wp-admin/admin.php?page=global-content/global-content-admin-new.php1,5897.03142.82120.09
Edit /wp-admin/admin.php?page=global-content/global-content-admin-edit.php1,5976.91146.78106.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_globalcontentbybb
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/global-content/global-content-admin-list-table.class.php on line 6
    • > PHP Notice
      Undefined index: page in wp-content/plugins/global-content/global-content-admin-edit.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/global-content/global-content-admin-list-table.class.php on line 6
    • > PHP Notice
      Undefined variable: gcbb_form_data in wp-content/plugins/global-content/global-content-admin-form.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/global-content/global-content-admin-form.php on line 1
    • > PHP Notice
      Undefined variable: gcbb_form_data in wp-content/plugins/global-content/global-content-admin-form.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/global-content/global-content-admin-list-table.class.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/global-content/global-content-admin-new.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/global-content/global-content.php:19
    • > PHP Notice
      Undefined index: page in wp-content/plugins/global-content/global-content-admin-new.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

global-content/global-content.php Passed 13 tests

The main file in "Global Content by BusinessBox" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
Define only once some global content and reuse easily in templates and posts/pages as many times as required.

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
Everything looks great! No dangerous files found in this plugin408 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP89076405
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.50
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
global-content-menu.png0.78KB0.88KB0.00%
global_content_title.png2.49KB1.75KB▼ 29.54%