78% recentnews-shortcode

Code Review | RecentNews ShortCode

WordPress plugin RecentNews ShortCode scored 78% from 54 tests.

About plugin

  • Plugin page: recentnews-shortcode
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Mar 17, 2017
  • Latest release: Mar 25, 2017
  • Number of updates: 22
  • Update frequency: every 4.4 days
  • Top authors: alexstocker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 432 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.74ms] Passed 4 tests

This is a short check of server-side resources used by RecentNews ShortCode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.75 ▼0.94
Dashboard /wp-admin3.37 ▲0.0747.35 ▼5.41
Posts /wp-admin/edit.php3.48 ▲0.1349.70 ▲3.81
Add New Post /wp-admin/post-new.php5.95 ▲0.0796.24 ▼13.27
Media Library /wp-admin/upload.php3.29 ▲0.0737.26 ▲0.67
RecentNews /wp-admin/options-general.php?page=recentnews3.2533.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for RecentNews ShortCode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.67 ▼0.915.45 ▲3.5245.99 ▼6.08
Dashboard /wp-admin2,210 ▲224.89 ▼0.1898.49 ▼20.2637.82 ▼12.01
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0037.76 ▲4.5135.60 ▲1.60
Add New Post /wp-admin/post-new.php1,547 ▲3318.43 ▼4.99589.49 ▲9.7760.23 ▲13.12
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0094.85 ▼5.8140.61 ▼5.89
RecentNews /wp-admin/options-general.php?page=recentnews7852.0325.7723.85

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=recentnews
    • > Notice in wp-content/plugins/recentnews-shortcode/admin/partials/recentnews-admin-display.php+21
    Trying to access array offset on value of type bool

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/recentnews-shortcode/admin/partials/recentnews-admin-display.php:16

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === recentnews-shortcode === )
You can look at the official readme.txt

recentnews-shortcode/recentnews.php 85% from 13 tests

The main PHP file in "RecentNews ShortCode" ver. 1.0.2 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 ("recentnews-shortcode.php" instead of "recentnews.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin311 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11122529250
JavaScript26044
CSS13017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected