84% nspecific-popular-posts-widget

Code Review | nSpecific-Popular-Posts

WordPress plugin nSpecific-Popular-Posts scored84%from 54 tests.

About plugin

  • Plugin page: nspecific-popular...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2013
  • Latest release: Jun 16, 2014
  • Number of updates: 5
  • Update frequency: every 64.8 days
  • Top authors: azwebsols (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.99ms] Passed 4 tests

Server-side resources used by nSpecific-Popular-Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.11 ▲6.54
Dashboard /wp-admin3.36 ▲0.0647.47 ▼3.26
Posts /wp-admin/edit.php3.41 ▲0.0549.54 ▼1.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.47 ▼11.16
Media Library /wp-admin/upload.php3.28 ▲0.0537.12 ▼0.02

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: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_nspecific_popular_posts_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for nSpecific-Popular-Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.20 ▼0.831.84 ▼0.3140.10 ▼9.70
Dashboard /wp-admin2,203 ▲155.84 ▲0.9399.51 ▼12.5240.73 ▼0.86
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0239.36 ▼2.8434.82 ▼1.19
Add New Post /wp-admin/post-new.php1,533 ▼923.01 ▲4.63653.72 ▲24.2859.20 ▲7.70
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0299.79 ▼8.1844.66 ▼3.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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_nspecific_popular_posts_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nspecific-popular-posts-widget/nSpecific_Popular_Posts_widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: popular posts, most viewed posts

nspecific-popular-posts-widget/nSpecific_Popular_Posts_widget.php 92% from 13 tests

"nSpecific-Popular-Posts" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nspecific-popular-posts-widget.php" instead of "nSpecific_Popular_Posts_widget.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
Success! There were no dangerous files found in this plugin235 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16031235

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity19.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%
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 images were found in this plugin