78% custom-content

Code Review | Custom Content by (Shortcode, Widget, Wp Bakery)

WordPress plugin Custom Content by (Shortcode, Widget, Wp Bakery) scored78%from 54 tests.

About plugin

  • Plugin page: custom-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Sep 15, 2020
  • Latest release: Feb 14, 2022
  • Number of updates: 14
  • Update frequency: every 36.9 days
  • Top authors: umairsaleem (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /841 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.81ms] Passed 4 tests

An overview of server-side resources used by Custom Content by (Shortcode, Widget, Wp Bakery)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.73 ▼1.17
Dashboard /wp-admin3.38 ▲0.0749.98 ▼4.11
Posts /wp-admin/edit.php3.43 ▲0.0755.84 ▲5.32
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.42 ▼17.33
Media Library /wp-admin/upload.php3.30 ▲0.0739.08 ▼0.64
Settings /wp-admin/edit.php?post_type=custom-content&page=escc_plugin_settings_page3.2729.93
Custom Contents /wp-admin/edit.php?post_type=custom-content3.3535.37
Add New /wp-admin/post-new.php?post_type=custom-content3.4252.48

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Content by (Shortcode, Widget, Wp Bakery)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.72 ▲0.281.54 ▼0.2843.22 ▼2.98
Dashboard /wp-admin2,228 ▲575.56 ▲0.0297.79 ▼6.4790.61 ▲46.15
Posts /wp-admin/edit.php2,130 ▲301.98 ▼0.0237.03 ▼1.7534.90 ▼2.45
Add New Post /wp-admin/post-new.php1,569 ▲4323.06 ▼0.01760.23 ▲49.7165.96 ▲5.56
Media Library /wp-admin/upload.php1,427 ▲244.12 ▲0.00102.69 ▼10.7667.12 ▲21.68
Settings /wp-admin/edit.php?post_type=custom-content&page=escc_plugin_settings_page8541.6928.4433.24
Custom Contents /wp-admin/edit.php?post_type=custom-content1,1161.9335.2230.31
Add New /wp-admin/post-new.php?post_type=custom-content2,2417.53182.48130.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/custom-content/inc/custom-content-vc-module.php
    • > /wp-content/plugins/custom-content/custom-content.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-content/inc/custom-content-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content/inc/custom-content-register.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: You can look at the official readme.txt

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

The main PHP file in "Custom Content by (Shortcode, Widget, Wp Bakery)" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected385 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47066382
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.50
▷ Minimum class complexity5.00
▷ Maximum class complexity12.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menuicon.png1.29KB0.67KB▼ 48.30%
assets/images/module-icon.png2.20KB1.13KB▼ 48.56%