83% xe-advanced-recent-posts-widget

Code Review | XE Advanced Recent Posts Widget

WordPress plugin XE Advanced Recent Posts Widget scored83%from 54 tests.

About plugin

  • Plugin page: xe-advanced-recen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Jul 30, 2015
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: xieno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,023 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.67ms] Passed 4 tests

A check of server-side resources used by XE Advanced Recent Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.38 ▼1.44
Dashboard /wp-admin3.36 ▲0.0149.56 ▼12.00
Posts /wp-admin/edit.php3.41 ▲0.0552.24 ▲1.27
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.05 ▼6.50
Media Library /wp-admin/upload.php3.28 ▲0.0537.16 ▲2.00

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_xe-advanced-recent-posts_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for XE Advanced Recent Posts Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.47 ▼0.181.88 ▲0.1042.84 ▲0.30
Dashboard /wp-admin2,213 ▲285.90 ▲0.0498.93 ▼3.2240.44 ▼0.60
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0039.80 ▲5.7536.34 ▲0.62
Add New Post /wp-admin/post-new.php1,527 ▼318.45 ▲0.14660.37 ▲29.8157.14 ▲7.00
Media Library /wp-admin/upload.php1,395 ▲44.16 ▼0.0695.87 ▼8.8143.53 ▼4.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_xe-advanced-recent-posts_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 add_action() in wp-content/plugins/xe-advanced-recent-posts-widget/xe-advanced-recent-posts-widget.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Please add images for these screenshots: #1 (Widget Options), #2 (Viewing the Widget)
Please take inspiration from this readme.txt

xe-advanced-recent-posts-widget/xe-advanced-recent-posts-widget.php Passed 13 tests

The primary PHP file in "XE Advanced Recent Posts Widget" version 1.0.0 is used by WordPress to initiate all plugin functionality
31 characters long description:
XE Advanced Recent Posts Widget

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
No dangerous file extensions were detected225 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16349195
JavaScript12016
CSS27014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity10.25
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.14KB6.16KB▼ 13.78%
screenshot-1.png15.46KB14.61KB▼ 5.52%
images/imagenotfound.png3.09KB0.26KB▼ 91.56%