64% content-holders

Code Review | Content Holders

WordPress plugin Content Holders scored64%from 54 tests.

About plugin

  • Plugin page: content-holders
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2012
  • Latest release: Apr 25, 2013
  • Number of updates: 12
  • Update frequency: every 11.9 days
  • Top authors: jpg5f2 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,644 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.25MB] [CPU: ▼42.04ms] Passed 4 tests

Server-side resources used by Content Holders
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7314.14 ▼22.43
Dashboard /wp-admin2.77 ▼0.5715.70 ▼42.95
Posts /wp-admin/edit.php2.77 ▼0.5817.01 ▼25.60
Add New Post /wp-admin/post-new.php2.77 ▼3.1114.82 ▼77.16
Media Library /wp-admin/upload.php2.77 ▼0.4614.03 ▼17.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Holders
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9915.43 ▲1.031.89 ▲0.1944.07 ▲3.76
Dashboard /wp-admin2,248 ▲566.88 ▲1.94129.41 ▲24.3838.09 ▼1.80
Posts /wp-admin/edit.php2,303 ▲2143.69 ▲1.6862.98 ▲25.1734.99 ▲3.43
Add New Post /wp-admin/post-new.php1,561 ▲4217.82 ▼5.15673.96 ▲59.0140.01 ▼7.87
Media Library /wp-admin/upload.php1,602 ▲2175.33 ▲1.16125.11 ▲28.7240.54 ▼4.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/content-holders/content-holders.php+71
    Non-static method JGCHShortcodeLoader::getAllShortcodes() should not be called statically
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_jgch_shortcodes
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/content-holders/content-holders.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This describes screenshot-1.png. The content holder editor screen. This shows a content holder being used to to hold a menu.), #2 (This describes screenshot-2.png. This shows the content holders list screen, which lists all the users content holder.)
Please take inspiration from this readme.txt

content-holders/content-holders.php 92% from 13 tests

"Content Holders" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 283 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin572 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP795244390
CSS110150
PO File10017
JavaScript10015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods2266.67%
▷ Protected methods412.12%
▷ Private methods721.21%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png81.99KB27.17KB▼ 66.86%
assets/screenshot-2.png70.77KB22.12KB▼ 68.74%