68% popularity-stats

Code Review | Popularity Stats for WordPress

WordPress plugin Popularity Stats for WordPress scored 68% from 54 tests.

About plugin

  • Plugin page: popularity-stats
  • Plugin version: 2017.08.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.0
  • WordPress version: 6.3.1
  • First release: May 18, 2010
  • Latest release: Jul 13, 2017
  • Number of updates: 29
  • Update frequency: every 102.5 days
  • Top authors: christopherross (79.31%)horshipsrectors (24.14%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 26,739 total downloads

Benchmarks

Plugin footprint 65% 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.89MB] [CPU: ▼33.02ms] Passed 4 tests

This is a short check of server-side resources used by Popularity Stats for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.87 ▼4.68
Dashboard /wp-admin3.05 ▼0.2525.82 ▼20.28
Posts /wp-admin/edit.php3.05 ▼0.3124.99 ▼22.17
Add New Post /wp-admin/post-new.php3.05 ▼2.8422.38 ▼76.14
Media Library /wp-admin/upload.php3.05 ▼0.1822.09 ▼13.49

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
db_upgraded
horshipsrectors_popularity_track_alexa
horshipsrectors_popularity_track_pagerank
horshipsrectors_popularity_track_links
horshipsrectors_popularity_checker_google_check
horshipsrectors_popularity_checker_alexa_check
horshipsrectors_popularity_daystodisplay
widget_theysaidso_widget
horshipsrectors_popularity_checker_google_value_1696372163
...

Browser metrics Passed 4 tests

Popularity Stats for WordPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲6313.33 ▼1.421.72 ▼0.3237.15 ▼11.41
Dashboard /wp-admin2,214 ▲235.86 ▲0.95107.68 ▼1.8042.81 ▲1.76
Posts /wp-admin/edit.php2,094 ▲51.96 ▼0.0036.43 ▼4.5132.12 ▼4.74
Add New Post /wp-admin/post-new.php1,541 ▲2123.46 ▲0.34656.84 ▲31.1050.58 ▼4.56
Media Library /wp-admin/upload.php1,399 ▲84.21 ▲0.0099.38 ▲3.7144.56 ▲0.66
Popularity Stats /wp-admin/popularity-stats.php260.440.1113.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 14 options in the database
    • horshipsrectors_popularity_checker_alexa_check
    • horshipsrectors_popularity_track_pagerank
    • widget_theysaidso_widget
    • horshipsrectors_popularity_checker_google_value_1696372163
    • horshipsrectors_popularity_daystocheck
    • horshipsrectors_popularity_daystodisplay
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/popularity-stats/popularity-stats.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/popularity-stats.php
    • > Network (severe)
    wp-admin/popularity-stats.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg), #3 (screenshot-3.jpg), #4 (screenshot-4.jpg)
The official readme.txt might help

popularity-stats/popularity-stats.php 92% from 13 tests

This is the main PHP file of "Popularity Stats for WordPress" version 2017.08.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin8,883 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript378732,8908,284
PHP316849474
CSS22716125

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin