84% wp-custom-cms-block

Code Review | Wp Custom CMS Block

WordPress plugin Wp Custom CMS Block scored84%from 54 tests.

About plugin

  • Plugin page: wp-custom-cms-block
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Dec 16, 2012
  • Latest release: Mar 29, 2013
  • Number of updates: 33
  • Update frequency: every 3.2 days
  • Top authors: digontoahsan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Wp Custom CMS Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.93 ▼1.02
Dashboard /wp-admin3.32 ▲0.0148.93 ▼2.98
Posts /wp-admin/edit.php3.37 ▲0.0154.07 ▼3.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.37 ▲1.61
Media Library /wp-admin/upload.php3.25 ▲0.0131.89 ▼2.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_custom_cms_block
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Custom CMS Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.41 ▲0.441.73 ▼0.2443.92 ▲1.48
Dashboard /wp-admin2,211 ▲345.60 ▼0.1692.17 ▼10.6743.34 ▼5.55
Posts /wp-admin/edit.php2,116 ▲132.01 ▼0.0340.49 ▼0.8935.45 ▼4.92
Add New Post /wp-admin/post-new.php1,539 ▼1617.61 ▼0.66696.43 ▲80.9459.74 ▲1.26
Media Library /wp-admin/upload.php1,413 ▲104.28 ▲0.1097.53 ▼2.5445.15 ▼1.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: submitAddBlck in wp-content/plugins/wp-custom-cms-block/wpcc_block_admin.php on line 93
    • > PHP Notice
      Undefined index: submitBlckUpdate in wp-content/plugins/wp-custom-cms-block/wpcc_block_admin.php on line 96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-custom-cms-block/wp_custom_cms_block.php:32
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-custom-cms-block/wpcc_block_admin.php:252
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-custom-cms-block/wpcc_block_admin.php on line 250
    • > PHP Notice
      Undefined index: submitBlck in wp-content/plugins/wp-custom-cms-block/wpcc_block_admin.php on line 90

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

wp-custom-cms-block/wp_custom_cms_block.php 92% from 13 tests

The principal PHP file in "Wp Custom CMS Block" v. 2.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-custom-cms-block.php" instead of "wp_custom_cms_block.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected365 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23315365

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions10
▷ Named functions10100.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 files were detected