90% wp-custom-post-comparison

Code Review | WP Custom Post Comparison

WordPress plugin WP Custom Post Comparison scored90%from 54 tests.

About plugin

  • Plugin page: wp-custom-post-co...
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2019
  • Latest release: Oct 9, 2019
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: pramod183 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼12.19ms] Passed 4 tests

This is a short check of server-side resources used by WP Custom Post Comparison
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.72 ▼6.44
Dashboard /wp-admin3.35 ▲0.0448.07 ▼0.19
Posts /wp-admin/edit.php3.46 ▲0.1152.61 ▲1.85
Add New Post /wp-admin/post-new.php5.18 ▼0.7163.06 ▼43.99
Media Library /wp-admin/upload.php3.27 ▲0.0439.79 ▲2.86
Custom Post Type /wp-admin/admin.php?page=custom-post3.2432.31
CP Comparison /wp-admin/admin.php?page=custom-post-comparison3.2433.18
Custom Fields /wp-admin/admin.php?page=cp-custom-field3.2434.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Custom Post Comparison
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲10414.35 ▲0.071.85 ▲0.1343.04 ▲0.03
Dashboard /wp-admin2,257 ▲805.62 ▼0.0487.64 ▼0.8339.90 ▼5.58
Posts /wp-admin/edit.php2,165 ▲652.05 ▲0.1039.79 ▼0.2939.75 ▼0.32
Add New Post /wp-admin/post-new.php1,555 ▲1723.03 ▲4.81668.67 ▲54.0956.19 ▼15.57
Media Library /wp-admin/upload.php1,462 ▲594.27 ▲0.04101.58 ▼4.1442.35 ▼2.68
Custom Post Type /wp-admin/admin.php?page=custom-post1,6131.7428.3730.61
CP Comparison /wp-admin/admin.php?page=custom-post-comparison8831.8124.9754.72
Custom Fields /wp-admin/admin.php?page=cp-custom-field8851.7027.7425.22

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: directory, comparison, product compare, post compare, compare...

wp-custom-post-comparison/wp-custom-post-comparison.php 92% from 13 tests

The entry point to "WP Custom Post Comparison" version 0.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes

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 detected1,281 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3701621,102
JavaScript13134145
CSS15034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity107.00
▷ Minimum class complexity107.00
▷ Maximum class complexity107.00
Average method complexity6.58
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pb-trp-cross-promotion.png7.44KB3.61KB▼ 51.53%