83% loft-postreorder

Code Review | Loft PostReorder

WordPress plugin Loft PostReorder scored83%from 54 tests.

About plugin

  • Plugin page: loft-postreorder
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Feb 14, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: loftocean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Loft PostReorder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.39 ▼1.45
Dashboard /wp-admin3.32 ▼0.0247.70 ▼13.10
Posts /wp-admin/edit.php3.43 ▲0.0848.27 ▼1.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.87 ▼15.22
Media Library /wp-admin/upload.php3.24 ▲0.0137.23 ▲3.22

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loft PostReorder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.18 ▼0.161.75 ▲0.2442.78 ▲3.98
Dashboard /wp-admin2,195 ▲155.61 ▼0.0794.28 ▲9.9842.27 ▼0.74
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0833.77 ▼6.2132.78 ▼2.50
Add New Post /wp-admin/post-new.php1,528 ▲222.55 ▼0.67679.75 ▲8.6450.05 ▲2.67
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.01106.40 ▲7.1745.43 ▼0.75

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loft-postreorder/inc/admin-manager.php:160
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loft-postreorder/loft-post-reorder.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loft-postreorder/inc/front-manager.php:47

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 90% 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
Attributes that require attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

loft-postreorder/loft-post-reorder.php 85% from 13 tests

The main file in "Loft PostReorder" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("loft-postreorder.php" instead of "loft-post-reorder.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin274 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4597228
CSS24023
JavaScript23023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.67
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected