83% latest-posts-with-order-option

Code Review | Latest Posts with Order Option

WordPress plugin Latest Posts with Order Option scored83%from 54 tests.

About plugin

  • Plugin page: latest-posts-with...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 28, 2013
  • Latest release: Oct 3, 2013
  • Number of updates: 11
  • Update frequency: every 3.3 days
  • Top authors: henrichro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.12ms] Passed 4 tests

Server-side resources used by Latest Posts with Order Option
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.86 ▼0.31
Dashboard /wp-admin3.31 ▼0.0353.48 ▼10.68
Posts /wp-admin/edit.php3.36 ▲0.0149.20 ▼1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.74 ▼16.43
Media Library /wp-admin/upload.php3.23 ▲0.0039.15 ▲0.52

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Latest Posts with Order Option: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3113.19 ▼1.161.79 ▼0.1044.95 ▲1.23
Dashboard /wp-admin2,223 ▲175.80 ▼0.10102.99 ▲1.5739.57 ▼3.61
Posts /wp-admin/edit.php2,102 ▲22.00 ▼0.0435.56 ▼4.2634.48 ▼1.38
Add New Post /wp-admin/post-new.php1,542 ▼323.29 ▼0.09664.86 ▼7.1451.89 ▼8.40
Media Library /wp-admin/upload.php1,402 ▲24.21 ▲0.0596.16 ▼24.1446.13 ▼2.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/latest-posts-with-order-option/lpwoo.php:10

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The admin interface of the 'Latest Posts with Order Option' widget is friendly and easy to use.) image missing
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

latest-posts-with-order-option/lpwoo.php 92% from 13 tests

The main PHP file in "Latest Posts with Order Option" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("latest-posts-with-order-option.php" instead of "lpwoo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1168211
CSS1004

PHP code Passed 2 tests

A short review 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.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin