10% wpr-general-posts-widget

Code Review | WPR General Posts

WordPress plugin WPR General Posts scored10%from 54 tests.

About plugin

  • Plugin page: wpr-general-posts...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Apr 9, 2018
  • Number of updates: 14
  • Update frequency: every 86.4 days
  • Top authors: dunar21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,524 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wpr-general-posts-widget/wpr-general-posts.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; GardenGeneralPosts has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.85ms] Passed 4 tests

A check of server-side resources used by WPR General Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.50 ▼2.90
Dashboard /wp-admin3.31 ▲0.0144.27 ▼7.67
Posts /wp-admin/edit.php3.37 ▲0.0147.95 ▲2.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.72 ▼10.75
Media Library /wp-admin/upload.php3.24 ▲0.0135.12 ▼2.08

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_gardengeneralposts

Browser metrics Passed 4 tests

WPR General Posts: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.021.49 ▼0.5239.02 ▼3.39
Dashboard /wp-admin2,192 ▲125.57 ▼0.0794.68 ▲0.1342.77 ▲1.85
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0439.02 ▲1.2037.37 ▲0.00
Add New Post /wp-admin/post-new.php1,535 ▲718.29 ▼4.86612.77 ▼35.3664.90 ▲12.75
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.07106.60 ▲7.3240.14 ▼7.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_gardengeneralposts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpr-general-posts-widget/wpr-general-posts.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpr-general-posts-widget/1.3.0/wpr-general-posts.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wpr-general-posts-widget === )
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wpr-general-posts-widget/wpr-general-posts.php 85% from 13 tests

The principal PHP file in "WPR General Posts" v. 1.3.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpr-general-posts-widget.php" instead of "wpr-general-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected230 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14431230

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity9.75
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected