83% mi-post-order

Code Review | Codeprey - Mi Post Order

WordPress plugin Codeprey - Mi Post Order scored83%from 54 tests.

About plugin

  • Plugin page: mi-post-order
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2017
  • Latest release: Jan 16, 2017
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: vikasverma091 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.42ms] Passed 4 tests

A check of server-side resources used by Codeprey - Mi Post Order
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.05 ▲0.90
Dashboard /wp-admin3.32 ▲0.0153.96 ▲1.71
Posts /wp-admin/edit.php3.37 ▲0.0149.89 ▼1.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.91 ▼6.40
Media Library /wp-admin/upload.php3.24 ▲0.0137.24 ▲1.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_postorder_widget
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Codeprey - Mi Post Order
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.451.81 ▼0.0743.84 ▼0.27
Dashboard /wp-admin2,209 ▲214.88 ▼0.03102.54 ▼2.0538.68 ▼6.42
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0135.23 ▲0.5836.16 ▼1.41
Add New Post /wp-admin/post-new.php1,514 ▼017.41 ▼0.24659.47 ▼48.4557.16 ▼8.92
Media Library /wp-admin/upload.php1,388 ▲64.24 ▲0.03103.56 ▲3.4646.72 ▼2.77

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_postorder_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mi-post-order/class-mipostorder-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mi-post-order/class-mipostorder-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes: The official readme.txt might help

mi-post-order/mipostorder.php 85% from 13 tests

The entry point to "Codeprey - Mi Post Order" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mi-post-order.php" instead of "mipostorder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected46 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP272546

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png35.66KB8.45KB▼ 76.30%
screenshot-1.png71.80KB24.53KB▼ 65.84%
screenshot-3.png38.20KB9.40KB▼ 75.39%