84% jetpack-popular-posts

Code Review | Jetpack Popular Posts

WordPress plugin Jetpack Popular Posts scored84%from 54 tests.

About plugin

  • Plugin page: jetpack-popular-p...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 4
  • Update frequency: every 282.5 days
  • Top authors: LordPretender (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,913 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.40ms] Passed 4 tests

This is a short check of server-side resources used by Jetpack Popular Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.11 ▼1.31
Dashboard /wp-admin3.35 ▲0.0550.08 ▼6.90
Posts /wp-admin/edit.php3.40 ▲0.0450.67 ▼1.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.60 ▼7.87
Media Library /wp-admin/upload.php3.27 ▲0.0434.86 ▼1.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_jpp_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jetpack Popular Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼0.931.65 ▼0.1142.28 ▼0.39
Dashboard /wp-admin2,206 ▲154.85 ▼1.06109.72 ▼5.9839.39 ▼2.11
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.09 ▼2.2635.17 ▼0.60
Add New Post /wp-admin/post-new.php1,523 ▼1923.46 ▲5.33692.44 ▲65.7269.69 ▲15.86
Media Library /wp-admin/upload.php1,391 ▼04.25 ▲0.06102.03 ▲2.6250.40 ▲6.88

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_jpp_widget
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/jetpack-popular-posts/jetpack-popular-posts.php:14

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: popular posts, view, popular, widget, category...

jetpack-popular-posts/jetpack-popular-posts.php Passed 13 tests

Analyzing the main PHP file in "Jetpack Popular Posts" version 1.0.1
69 characters long description:
Using Jetpack stats, this widget will display the most popular posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin189 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15764156
PO File1255133

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods444.44%
▷ Protected methods00.00%
▷ Private methods555.56%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin