10% gna-post-order

Code Review | GNA Post Order

WordPress plugin GNA Post Order scored10%from 54 tests.

About plugin

  • Plugin page: gna-post-order
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 20
  • Update frequency: every 16.1 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,544 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_PostOrder::activate_handler() should not be called statically

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

Analyzing server-side resources used by GNA Post Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.71 ▲0.75
Dashboard /wp-admin3.39 ▲0.0950.81 ▲1.97
Posts /wp-admin/edit.php3.50 ▲0.1555.11 ▲6.27
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.63 ▼2.36
Media Library /wp-admin/upload.php3.31 ▲0.0839.44 ▲0.89
ReOrder /wp-admin/upload.php?page=gna-post-order-attachment3.3434.99
ReOrder /wp-admin/edit.php?post_type=wp_navigation&page=gna-post-order-wp_navigation3.3433.86
ReOrder /wp-admin/edit.php?page=gna-post-order-post3.3637.42
ReOrder /wp-admin/edit.php?post_type=wp_block&page=gna-post-order-wp_block3.3436.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 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

Checking browser requirements for GNA Post Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.24 ▼0.111.91 ▲0.0543.91 ▼0.36
Dashboard /wp-admin2,206 ▲295.56 ▼0.1089.34 ▲0.3974.33 ▲30.66
Posts /wp-admin/edit.php2,129 ▲261.99 ▲0.0238.09 ▼2.1833.81 ▼4.15
Add New Post /wp-admin/post-new.php1,707 ▲18124.67 ▲1.42671.87 ▲64.9755.71 ▲3.94
Media Library /wp-admin/upload.php1,426 ▲234.11 ▼0.0798.89 ▼8.8069.21 ▲20.39
ReOrder /wp-admin/upload.php?page=gna-post-order-attachment9404.5745.1159.25
ReOrder /wp-admin/edit.php?post_type=wp_navigation&page=gna-post-order-wp_navigation9434.6946.1629.06
ReOrder /wp-admin/edit.php?page=gna-post-order-post9474.6446.1452.67
ReOrder /wp-admin/edit.php?post_type=wp_block&page=gna-post-order-wp_block9434.6244.6577.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_PostOrder::deactivate_handler() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/gna-post-order/admin/gna-post-order-worker.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-post-order/inc/gna-post-order-config.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_PostOrder_Admin_Menu' not found in wp-content/plugins/gna-post-order/admin/gna-post-order-admin-sortpage-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_PostOrder_Admin_Menu' not found in wp-content/plugins/gna-post-order/admin/gna-post-order-admin-settings-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Invalid URI ("none")
The official readme.txt might help

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

This is the main PHP file of "GNA Post Order" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
133 characters long description:
Post order and custom post type objects (posts, any custom post types) using a drag and drop sortable javascript ajax user interface.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin749 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP814150629
CSS1153106
JavaScript13014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.71
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods64
▷ Static methods46.25%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/gna_20x20.png2.98KB0.33KB▼ 88.89%
assets/images/ui-bg_glass_55_fbf9ee_1x400.png0.37KB0.12KB▼ 66.04%
assets/images/ui-icons_222222_256x240.png6.84KB4.18KB▼ 38.88%