79% content-holder

Code Review | Content Holder

WordPress plugin Content Holder scored79%from 54 tests.

About plugin

  • Plugin page: content-holder
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.0
  • WordPress version: 6.3.1
  • First release: Jun 3, 2015
  • Latest release: May 21, 2019
  • Number of updates: 47
  • Update frequency: every 30.8 days
  • Top authors: kingdomcreation (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,084 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.12MB] [CPU: ▼8.83ms] Passed 4 tests

This is a short check of server-side resources used by Content Holder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.74 ▲3.95
Dashboard /wp-admin3.35 ▲0.0546.28 ▼4.30
Posts /wp-admin/edit.php3.40 ▲0.0444.28 ▼1.52
Add New Post /wp-admin/post-new.php5.27 ▼0.6265.81 ▼32.41
Media Library /wp-admin/upload.php3.27 ▲0.0536.76 ▲2.92
Content Holders /wp-admin/edit.php?post_type=content_holder3.3237.25
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=content_holder3.2738.92
Add Content Holder /wp-admin/post-new.php?post_type=content_holder5.2761.79

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
category_children
theysaidso_admin_options
widget_content_holders
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Content Holder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲5713.18 ▼1.201.70 ▼0.2643.74 ▼1.77
Dashboard /wp-admin2,234 ▲435.87 ▲0.9698.91 ▼4.9341.23 ▲2.61
Posts /wp-admin/edit.php2,114 ▲252.06 ▲0.0833.44 ▼3.4332.18 ▼2.19
Add New Post /wp-admin/post-new.php6,255 ▲4,74119.66 ▲2.06969.89 ▲275.9639.98 ▼11.66
Media Library /wp-admin/upload.php1,416 ▲254.11 ▼0.11126.45 ▲21.7052.00 ▲5.05
Content Holders /wp-admin/edit.php?post_type=content_holder1,1191.9538.0430.06
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=content_holder1,4712.1428.4831.75
Add Content Holder /wp-admin/post-new.php?post_type=content_holder1,51517.28877.8934.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • category_children
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_content_holders
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=content_holder
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Content_Holder_Block::content_holder_editor_assets() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× 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/content-holder/admin/partials/content-holder-admin-media-button.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/content-holder/includes/class-content-holder-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content-holder/admin/partials/content-holder-admin-mce-popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/content-holder/admin/partials/content-holder-admin-select.php:13

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: custom post type, widget, shortcode, plugin, content

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

The principal PHP file in "Content Holder" v. 1.1.0 is loaded by WordPress automatically on each request
110 characters long description:
Separate your content into reusable parts to use anywhere in your site through a function, shortcode or widget

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
There were no executable files found in this plugin645 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP16288624497
JavaScript14063145
CSS1253

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods36
▷ Static methods719.44%
▷ Public methods2980.56%
▷ Protected methods00.00%
▷ Private methods719.44%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin