10% dpp-popular-post-widget

Code Review | Wordpress Popular Post

WordPress plugin Wordpress Popular Post scored10%from 54 tests.

About plugin

  • Plugin page: dpp-popular-post-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2017
  • Latest release: Sep 25, 2017
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: Dolar Patel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/dpp-popular-post-widget/dpp_popularpost.php+302
    Function create_function() is deprecated

Server metrics [RAM: ▼1.83MB] [CPU: ▼62.21ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Popular Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.294.69 ▼44.21
Dashboard /wp-admin2.19 ▼1.166.13 ▼61.03
Posts /wp-admin/edit.php2.19 ▼1.176.10 ▼50.43
Add New Post /wp-admin/post-new.php2.19 ▼3.705.66 ▼93.15
Media Library /wp-admin/upload.php2.19 ▼1.046.14 ▼29.73

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_dpp_plugin
db_upgraded
theysaidso_admin_options
dppRegisterPostType
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Popular Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.71 ▼0.841.97 ▼0.0441.85 ▼0.46
Dashboard /wp-admin2,224 ▲214.79 ▼0.1197.77 ▼7.9140.84 ▼0.21
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0539.45 ▼2.8033.81 ▼2.18
Add New Post /wp-admin/post-new.php1,547 ▲1623.50 ▲0.39671.52 ▼6.7255.67 ▲2.80
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.02101.79 ▲4.7847.82 ▲1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dpp-popular-post-widget/dpp_popularpost.php+302
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_dpp_plugin
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

dpp-popular-post-widget/dpp_popularpost.php 92% from 13 tests

The main file in "Wordpress Popular Post" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dpp-popular-post-widget.php" instead of "dpp_popularpost.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin353 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13012263
CSS17190

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/view_icon.png0.53KB0.35KB▼ 34.92%
image/comment_icon.png0.64KB0.39KB▼ 39.79%
image/calender_icon.png1.47KB0.87KB▼ 41.32%