10% pages-order

Code Review | Pages Order

WordPress plugin Pages Order scored10%from 54 tests.

About plugin

  • Plugin page: pages-order
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jul 10, 2012
  • Latest release: Apr 18, 2016
  • Number of updates: 42
  • Update frequency: every 34.0 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /15,664 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/pages-order/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

Server metrics [RAM: ▼1.27MB] [CPU: ▼53.14ms] Passed 4 tests

An overview of server-side resources used by Pages Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.72 ▼0.746.15 ▼34.19
Dashboard /wp-admin2.74 ▼0.577.81 ▼46.41
Posts /wp-admin/edit.php2.74 ▼0.628.51 ▼41.86
Add New Post /wp-admin/post-new.php2.74 ▼3.157.36 ▼90.10
Media Library /wp-admin/upload.php2.74 ▼0.498.23 ▼26.11
Order /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order2.748.54

Server storage [IO: ▲1.71MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification found: 4 files (57.51KB) outside of "wp-content/plugins/pages-order/" and "wp-content/uploads/"
    • (new file) wp-content/sedlex/inline_styles/c1ea5308bc63252ad03e034a1d0db29299959e63.css
    • (new file) wp-content/sedlex/inline_styles/bc949ac5d0342b9fe4ffe5494c1066695980f06c.css
    • (new file) wp-content/sedlex/inline_styles/c03cbbde92df5cf2d123551f6f8f32b6e4a3ff99.css
    • (new file) wp-content/sedlex/inline_scripts/af58ea44541f302acd6328aec8d7a77becbaa3c3.js
Filesystem: 171 new files
Database: no new tables, 9 new options
New WordPress options
plugin_error_on_activation
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
coreSLframework_options
db_upgraded
theysaidso_admin_options
pages_order_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pages Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.20 ▼1.201.91 ▲0.0740.88 ▼4.13
Dashboard /wp-admin2,240 ▲554.85 ▼1.06109.74 ▲5.9538.58 ▼5.88
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0641.24 ▲4.9134.90 ▼3.00
Add New Post /wp-admin/post-new.php1,539 ▲2517.40 ▼0.12667.42 ▼22.6548.99 ▼7.74
Media Library /wp-admin/upload.php1,419 ▲284.22 ▲0.0494.52 ▼6.1642.82 ▼2.37
Order /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order9762.3149.0355.80
Pages Order /wp-admin/sedlex.php?page=pages-order/pages-order.php260.440.0813.27
About... /wp-admin/sedlex.php260.440.145.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/pages-order/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • coreSLframework_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • plugin_error_on_activation
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/admin_table.class.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Table has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/admin_table.class.php+317
    Methods with the same name as their class will not be constructors in a future version of PHP; adminCell has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/tabs.class.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Tabs has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/box.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Box has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/browser.class.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_BrowsersOsDetection has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/feedback.class.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Feedback has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/otherplugins.class.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_OtherPlugins has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/parameters.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Parameters has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/popup.class.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Popup has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/progress_bar.class.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Progressbar has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/translation.class.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Translation has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/text_diff.class.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Textdiff has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/tree.class.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; SLFramework_Treelist has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=page&page=edit_pages-order/pages-order
    • > Deprecated in wp-content/plugins/pages-order/core/utils.class.php+305
    Array and string offset access syntax with curly braces is deprecated

SRP 0% 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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pages-order/core.php
    • > /wp-content/plugins/pages-order/pages-order.php
    • > /wp-content/plugins/pages-order/core.class.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/pages-order/core/templates/my-plugin.php on line 18
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/pages-order/core/templates/my-plugin.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/sedlex.php?page=pages-order/pages-order.php
    • > Network (severe)
    wp-admin/sedlex.php?page=pages-order/pages-order.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/sedlex.php
    • > Network (severe)
    wp-admin/sedlex.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The tree view in the admin dashboard), #2 (The configuration page), #3 (The tree view displayed in the front pages), #4 (The breadcrumb displayed in the front pages)
Please take inspiration from this readme.txt

pages-order/pages-order.php 92% from 13 tests

This is the main PHP file of "Pages Order" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 215 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected17,092 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PO File363,94408,659
PHP199761,7746,914
JavaScript5206229778
CSS1210913626
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity51.42
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity7.03
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods159
▷ Static methods3522.01%
▷ Public methods15698.11%
▷ Protected methods31.89%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
37 PNG files occupy 0.50MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/arrow_down_s.png0.27KB0.27KB▼ 1.79%
core/img/tree_node_minus.png0.14KB0.12KB▼ 15.17%
core/img/arrow_up.png0.24KB0.27KB0.00%
img/icon-256x256.png34.17KB15.10KB▼ 55.79%
img/banner-1544x500.png154.99KB84.76KB▼ 45.31%