84% posts-order-widget

Code Review | Posts Order Widget

WordPress plugin Posts Order Widget scored84%from 54 tests.

About plugin

  • Plugin page: posts-order-widget
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2013
  • Latest release: Dec 12, 2013
  • Number of updates: 23
  • Update frequency: every 52.7 days
  • Top authors: LordPretender (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /4,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.52MB] [CPU: ▼25.76ms] Passed 4 tests

Analyzing server-side resources used by Posts Order Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▼0.6315.31 ▼27.27
Dashboard /wp-admin3.26 ▼0.0533.84 ▼13.26
Posts /wp-admin/edit.php3.19 ▼0.1731.50 ▼17.30
Add New Post /wp-admin/post-new.php4.66 ▼1.2342.51 ▼45.19
Media Library /wp-admin/upload.php3.29 ▲0.0638.82 ▲6.52

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

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

Browser metrics Passed 4 tests

Posts Order Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.201.59 ▼0.3540.10 ▼8.22
Dashboard /wp-admin2,209 ▲214.85 ▼0.03101.62 ▼13.3739.93 ▼6.43
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0040.18 ▲4.4534.75 ▼2.16
Add New Post /wp-admin/post-new.php1,519 ▼1423.28 ▼0.06673.20 ▲12.1154.19 ▼5.80
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.04100.08 ▼2.7742.37 ▼1.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_pow_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/posts-order-widget/post-order-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
7 plugin tags: category, sorting, categories, sort, default order...

posts-order-widget/post-order-widget.php 92% from 13 tests

"Posts Order Widget" version 2.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("posts-order-widget.php" instead of "post-order-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP278108199
PO File2303883

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.50
▷ Minimum class complexity19.00
▷ Maximum class complexity24.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected