84% simple-category-posts-widget

Code Review | Simple Category Posts Widget

WordPress plugin Simple Category Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: simple-category-p...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Jan 2, 2017
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: psdtohtmlcloud (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /2,263 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.04MB] [CPU: ▼6.77ms] Passed 4 tests

A check of server-side resources used by Simple Category Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.38 ▼0.56
Dashboard /wp-admin3.36 ▲0.0145.56 ▼10.43
Posts /wp-admin/edit.php3.41 ▲0.0548.75 ▲1.72
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.56 ▼17.81
Media Library /wp-admin/upload.php3.29 ▲0.0637.87 ▲3.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_p2hc_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Simple Category Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.23 ▼1.155.12 ▲3.2754.13 ▲12.37
Dashboard /wp-admin2,215 ▲244.88 ▼1.02106.72 ▲8.9541.89 ▲3.03
Posts /wp-admin/edit.php2,098 ▲62.08 ▲0.0541.04 ▼5.6836.41 ▲0.53
Add New Post /wp-admin/post-new.php1,527 ▲823.43 ▲0.22629.40 ▲43.3550.24 ▲0.22
Media Library /wp-admin/upload.php1,397 ▲64.29 ▲0.1096.41 ▼0.8242.34 ▼1.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_p2hc_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: disable_featured_image in wp-content/plugins/simple-category-posts-widget/inc/p2hc-category-posts-template.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-category-posts-widget/inc/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-category-posts-widget/simple-category-posts-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-category-posts-widget/inc/register-scripts.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/simple-category-posts-widget/inc/p2hc-category-posts-template.php:11

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: simple category posts widget, post-type posts widget, taxonomy posts widget, category posts widget

simple-category-posts-widget/simple-category-posts-widget.php 92% from 13 tests

"Simple Category Posts Widget" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 249 characters long)

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
No dangerous file extensions were detected6,166 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
HTML36702,712
JavaScript7204362,431
CSS56836693
PHP44052236
JSON20094

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/chosen_v1.6.2/chosen-sprite.png0.53KB0.88KB0.00%
js/chosen_v1.6.2/docsupport/oss-credit.png4.30KB3.26KB▼ 24.02%
js/chosen_v1.6.2/chosen-sprite@2x.png0.72KB0.83KB0.00%
js/chosen_v1.6.2/docsupport/chosen.png1.47KB2.08KB0.00%