84% wp-popular-posts-widget

Code Review | WP Popular Posts Widget

WordPress plugin WP Popular Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: wp-popular-posts-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2019
  • Latest release: Jul 5, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.43ms] Passed 4 tests

Server-side resources used by WP Popular Posts Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.94 ▼1.12
Dashboard /wp-admin3.34 ▲0.0346.58 ▼1.30
Posts /wp-admin/edit.php3.39 ▲0.0345.26 ▼3.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.21 ▼11.79
Media Library /wp-admin/upload.php3.26 ▲0.0332.36 ▼0.29

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_wp-popular-posts-widget
widget_recent-comments

Browser metrics Passed 4 tests

WP Popular Posts Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.78 ▲0.491.97 ▲0.0845.02 ▲2.23
Dashboard /wp-admin2,206 ▲185.88 ▼0.0297.53 ▼6.5739.16 ▼4.69
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0334.10 ▼1.1835.21 ▲4.17
Add New Post /wp-admin/post-new.php1,532 ▲1818.36 ▲0.82597.32 ▼86.5976.72 ▲24.19
Media Library /wp-admin/upload.php1,382 ▼94.17 ▼0.0399.17 ▼15.6744.73 ▼2.64

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 were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wp-popular-posts-widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-popular-posts-widget/wp-popular-posts-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: widget, popular post, post, thumbnail

wp-popular-posts-widget/wp-popular-posts-widget.php 85% from 13 tests

This is the main PHP file of "WP Popular Posts Widget" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("domain/path")

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
Good job! No executable or dangerous file extensions detected115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101077
CSS10038

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin