84% draggable-post-order

Code Review | Draggable Post Order

WordPress plugin Draggable Post Order scored84%from 54 tests.

About plugin

  • Plugin page: draggable-post-order
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Dec 26, 2020
  • Latest release: Mar 19, 2021
  • Number of updates: 9
  • Update frequency: every 9.3 days
  • Top authors: drogueronin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.89ms] Passed 4 tests

Server-side resources used by Draggable Post Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.84 ▼2.67
Dashboard /wp-admin3.38 ▲0.0845.43 ▼0.01
Posts /wp-admin/edit.php3.50 ▲0.1448.05 ▲6.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.69 ▲1.19
Media Library /wp-admin/upload.php3.31 ▲0.0832.48 ▼2.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Draggable Post Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.73 ▼0.0840.85 ▼5.60
Dashboard /wp-admin2,209 ▲185.90 ▲1.0199.78 ▼6.1938.70 ▼6.76
Posts /wp-admin/edit.php2,089 ▼02.06 ▼0.1239.12 ▲4.2233.94 ▼0.47
Add New Post /wp-admin/post-new.php1,537 ▲1823.48 ▲0.38604.17 ▼110.7551.61 ▼1.15
Media Library /wp-admin/upload.php1,382 ▼34.20 ▲0.02101.32 ▼3.3045.06 ▲0.47

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/draggable-post-order/draggable-post-order.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: post-type, drag, custom-post-type, order

draggable-post-order/draggable-post-order.php Passed 13 tests

This is the main PHP file of "Draggable Post Order" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
31 characters long description:
Drag'n'drop posts to order them

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
Success! There were no dangerous files found in this plugin790 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14265324724
JavaScript25541
Sass14019
JSON1005
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods51
▷ Static methods2956.86%
▷ Public methods4894.12%
▷ Protected methods00.00%
▷ Private methods35.88%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin