84% custom-posts-builder

Code Review | Custom Posts Builder

WordPress plugin Custom Posts Builder scored 84% from 54 tests.

About plugin

  • Plugin page: custom-posts-builder
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 5.8.1
  • First release: Sep 27, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: wpdevstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Custom Posts Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.63 ▲16.23
Dashboard /wp-admin3.12 ▲0.0740.49 ▼2.38
Posts /wp-admin/edit.php3.24 ▲0.1349.07 ▲2.89
Add New Post /wp-admin/post-new.php5.47 ▲0.0391.56 ▼575.08
Media Library /wp-admin/upload.php3.05 ▲0.0536.63 ▲2.54
CPB /wp-admin/admin.php?page=cpb3.0733.26
Getting started with Custom Posts Builder /wp-admin/index.php?page=cpb-getting-started3.0532.63
Tools /wp-admin/admin.php?page=cpb_tools3.0730.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 1 new option
New WordPress options
cpb_version

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Posts Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,919 ▲32319.00 ▲3.398.90 ▼4.4745.38 ▼1.30
Dashboard /wp-admin3,210 ▲2798.74 ▲2.78182.12 ▲35.71109.11 ▼6.57
Posts /wp-admin/edit.php3,008 ▲2695.53 ▲2.8296.19 ▲21.9586.30 ▼10.11
Add New Post /wp-admin/post-new.php1,915 ▲23216.55 ▼1.95409.36 ▲28.80113.37 ▼0.11
Media Library /wp-admin/upload.php1,854 ▲475.21 ▲0.16142.67 ▼49.81113.01 ▼5.08
CPB /wp-admin/admin.php?page=cpb3,7955.3992.3973.41
Getting started with Custom Posts Builder /wp-admin/index.php?page=cpb-getting-started1,6034.8790.88135.35
Tools /wp-admin/admin.php?page=cpb_tools1,3604.8791.8174.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • cpb_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-posts-builder/common/class-cpb-public.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-posts-builder/common/install.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-posts-builder/common/functions.php:292
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-posts-builder/admin/view/tools.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/custom-posts-builder/common/class-shortcode-parser.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-posts-builder/admin/view/crud.php:6

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 97% 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
Please take inspiration from this readme.txt

custom-posts-builder/custom-posts-builder.php Passed 13 tests

This is the main PHP file of "Custom Posts Builder" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
33 characters long description:
Best custom posts manager.period.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin3,177 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP117567492,165
CSS23329618
JavaScript211883375
Markdown111019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.00
▷ Minimum class complexity6.00
▷ Maximum class complexity64.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods72
▷ Static methods22.78%
▷ Public methods6995.83%
▷ Protected methods00.00%
▷ Private methods34.17%
Functions41
▷ Named functions4097.56%
▷ Anonymous functions12.44%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/ss/custom-posts-builder-unlimited-posts.png23.70KB10.80KB▼ 54.42%