79% custom-wp-framework

Code Review | Custom WP Framework

WordPress plugin Custom WP Framework scored79%from 54 tests.

About plugin

  • Plugin page: custom-wp-framework
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Sep 4, 2020
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: pullclicks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /343 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.06ms] Passed 4 tests

This is a short check of server-side resources used by Custom WP Framework
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.32 ▼5.52
Dashboard /wp-admin3.31 ▲0.0046.70 ▲2.76
Posts /wp-admin/edit.php3.36 ▲0.0051.48 ▼1.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.50 ▼16.49
Media Library /wp-admin/upload.php3.23 ▲0.0032.89 ▼1.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Custom WP Framework: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.29 ▼1.291.68 ▼0.4743.26 ▲0.76
Dashboard /wp-admin2,209 ▲245.91 ▲0.9197.80 ▼20.5938.85 ▼6.67
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0439.06 ▼4.0335.72 ▼0.24
Add New Post /wp-admin/post-new.php1,542 ▲1322.86 ▲4.84626.47 ▲8.0650.32 ▼2.45
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0298.85 ▼0.5141.36 ▼1.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall correctly, leaving 48 files (0.50MB) in the plugin directory
    • (new file) admin/assets/css/cwf-admin-cpt.css
    • (new file) admin/index.php
    • (new file) admin/controllers/class-cwf-cpt-controller.php
    • (new file) admin/assets/js/cwf-admin-media-uploader.js
    • (new file) admin/class-cwf-admin.php
    • (new file) admin/models/custom-post-types/class-cwf-add-cpt-viewmodel.php
    • (new file) admin/assets/js/cwf-admin-cpt.js
    • (new file) admin/assets/js/cwf-postbox.js
    • (new file) admin/assets/js/cwf-admin-tag-input.js
    • (new file) admin/controllers/index.php
    • ...
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: posts, custom

custom-wp-framework/custom-wp-framework.php 92% from 13 tests

The primary PHP file in "Custom WP Framework" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,718 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,2653,9764,573
JavaScript411163662
JSON100270
CSS1391213

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 143)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity27.27
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity6.61
▷ Minimum method complexity1.00
▷ Maximum method complexity143.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods103
▷ Static methods98.74%
▷ Public methods9693.20%
▷ Protected methods10.97%
▷ Private methods65.83%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ 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