10% cms-page-order

Code Review | CMS Page Order

WordPress plugin CMS Page Order scored 10% from 54 tests.

About plugin

  • Plugin page: cms-page-order
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.1
  • WordPress version: 5.8.1
  • First release: Apr 6, 2011
  • Latest release: Aug 28, 2014
  • Number of updates: 45
  • Update frequency: every 27.6 days
  • Top authors: bergius (55.56%)billerickson (46.67%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active / 45,920 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/cms-page-order/cms-page-order.php+353
    Declaration of PO_Walker::start_lvl(&$output, $depth) should be compatible with Walker_Page::start_lvl(&$output, $depth = 0, $args = Array)

Server metrics [RAM: ▼1.73MB] [CPU: ▼188.86ms] Passed 4 tests

Analyzing server-side resources used by CMS Page Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.91 ▼0.936.78 ▼30.55
Dashboard /wp-admin1.92 ▼1.1410.67 ▼35.03
Posts /wp-admin/edit.php1.93 ▼1.206.33 ▼46.79
Add New Post /wp-admin/post-new.php1.92 ▼3.516.52 ▼643.08
Media Library /wp-admin/upload.php1.92 ▼1.086.01 ▼26.56
Page Order /wp-admin/edit.php?post_type=page&page=order-page1.936.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for CMS Page Order
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲10216.23 ▲0.779.31 ▼0.0851.75 ▲4.88
Dashboard /wp-admin2,981 ▲505.88 ▼0.07140.29 ▼13.36117.67 ▼1.96
Posts /wp-admin/edit.php2,751 ▲122.69 ▼0.0069.40 ▼1.6595.33 ▼2.41
Add New Post /wp-admin/post-new.php1,693 ▲7818.79 ▼2.09382.16 ▲99.92119.29 ▲10.10
Media Library /wp-admin/upload.php1,819 ▲125.02 ▲0.02150.14 ▼11.39125.29 ▼3.52
Page Order /wp-admin/edit.php?post_type=page&page=order-page1,1332.6371.2280.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/cms-page-order/cms-page-order.php+353
    Declaration of PO_Walker::start_lvl(&$output, $depth) should be compatible with Walker_Page::start_lvl(&$output, $depth = 0, $args = Array)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=page&page=order-page
    • > Warning in wp-content/plugins/cms-page-order/cms-page-order.php+353
    Declaration of PO_Walker::start_lvl(&$output, $depth) should be compatible with Walker_Page::start_lvl(&$output, $depth = 0, $args = Array)
    • > GET request to /wp-admin/edit.php?post_type=page&page=order-page
    • > Warning in wp-content/plugins/cms-page-order/cms-page-order.php+357
    Declaration of PO_Walker::end_lvl(&$output, $depth) should be compatible with Walker_Page::end_lvl(&$output, $depth = 0, $args = Array)
    • > GET request to /wp-admin/edit.php?post_type=page&page=order-page
    • > Warning in wp-content/plugins/cms-page-order/cms-page-order.php+361
    Declaration of PO_Walker::start_el(&$output, $page, $depth, $args) should be compatible with Walker_Page::start_el(&$output, $page, $depth = 0, $args = Array, $current_page = 0)

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× 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/cms-page-order/cms-page-order.php:37
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cms-page-order/cms-page-order.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Pages displayed as a tree.), #2 (Filter hook to set the maximum number of nesting levels.), #3 (Post status labels with support for custom statuses.)
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

cms-page-order/cms-page-order.php Passed 13 tests

The primary PHP file in "CMS Page Order" version 0.3.3 is used by WordPress to initiate all plugin functionality
56 characters long description:
Change the page order with quick and easy drag and drop.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin795 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP18357325
CSS3170200
PO File34363138
JavaScript2184132

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/page.png0.22KB0.19KB▼ 17.03%
screenshot-1.png40.23KB14.37KB▼ 64.28%
screenshot-2.png29.98KB10.72KB▼ 64.24%
styles/images/lock.png0.22KB0.19KB▼ 11.26%
screenshot-3.png46.93KB16.74KB▼ 64.34%