83% simple-custom-post-order

Code Review | Simple Custom Post Order

WordPress plugin Simple Custom Post Order scored83%from 54 tests.

About plugin

  • Plugin page: simple-custom-pos...
  • Plugin version: 2.5.7
  • PHP compatiblity: 7.2.5 or higher+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Sep 20, 2023
  • Number of updates: 91
  • Update frequency: every 40.8 days
  • Top authors: hsameerc (30.77%)silkalns (29.67%)machothemes (21.98%)giucu91 (15.38%)colorlibplugins (6.59%)

Code review

54 tests

User reviews

501 reviews

Install metrics

200,000+ active /2,785,100 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.52ms] Passed 4 tests

Analyzing server-side resources used by Simple Custom Post Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.99 ▼7.83
Dashboard /wp-admin3.44 ▲0.1351.33 ▼2.04
Posts /wp-admin/edit.php3.56 ▲0.2058.07 ▲6.99
Add New Post /wp-admin/post-new.php6.02 ▲0.13101.96 ▲0.48
Media Library /wp-admin/upload.php3.36 ▲0.1342.19 ▲3.30
SCPOrder /wp-admin/options-general.php?page=scporder-settings3.3635.31

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Custom Post Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.38 ▼0.002.04 ▲0.5739.97 ▼3.14
Dashboard /wp-admin2,226 ▲465.54 ▼0.0591.52 ▲0.3990.73 ▲47.93
Posts /wp-admin/edit.php2,138 ▲412.00 ▼0.0341.23 ▲5.4238.53 ▲5.85
Add New Post /wp-admin/post-new.php1,574 ▲4822.97 ▼0.44768.03 ▲147.5751.50 ▼5.12
Media Library /wp-admin/upload.php1,431 ▲284.23 ▲0.01102.85 ▲1.3180.95 ▲34.93
SCPOrder /wp-admin/options-general.php?page=scporder-settings1,1672.0025.1329.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • simple-rate-time
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/simple-custom-post-order/class-simple-review.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-custom-post-order/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-custom-post-order/simple-custom-post-order.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Order Custom Posts), #2 (Order Posts), #3 (Settings)
  • Requires php: Version format is invalid
The official readme.txt is a good inspiration

simple-custom-post-order/simple-custom-post-order.php 92% from 13 tests

The primary PHP file in "Simple Custom Post Order" version 2.5.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires PHP: Required version number should only contain digits separated by dots (ex. "7.0" instead of "7.2.5 or higher")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,268 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3270521,101
JavaScript4242098
PO File1192169

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity66.00
▷ Minimum class complexity10.00
▷ Maximum class complexity122.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 1.22MB with 0.83MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png358.82KB107.46KB▼ 70.05%
screenshot-2.png551.93KB174.38KB▼ 68.41%
screenshot-1.png342.27KB116.87KB▼ 65.85%