10% post-popularity-chart-widget-lite

Code Review | Post Popularity Chart Widget

WordPress plugin Post Popularity Chart Widget scored10%from 54 tests.

About plugin

  • Plugin page: post-popularity-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2015
  • Latest release: Aug 18, 2015
  • Number of updates: 12
  • Update frequency: every 16.4 days
  • Top authors: Piotr Pesta (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,803 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 did not install without errors
    • > Deprecated in wp-content/plugins/post-popularity-chart-widget-lite/post-popularity-chart-widget.php+37
    Methods with the same name as their class will not be constructors in a future version of PHP; post_popularity_graph has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼56.44ms] Passed 4 tests

Analyzing server-side resources used by Post Popularity Chart Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.87 ▼36.82
Dashboard /wp-admin2.12 ▼1.186.37 ▼42.75
Posts /wp-admin/edit.php2.12 ▼1.246.00 ▼46.67
Add New Post /wp-admin/post-new.php2.12 ▼3.775.94 ▼99.51
Media Library /wp-admin/upload.php2.12 ▼1.115.95 ▼30.03

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 7 new options
New tables
wp_post_popularity_graph
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_post_popularity_graph
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Post Popularity Chart Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.021.74 ▼0.2647.11 ▲1.74
Dashboard /wp-admin2,192 ▲155.51 ▼0.1386.76 ▼12.5136.69 ▼7.48
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0237.45 ▲0.2142.55 ▲8.04
Add New Post /wp-admin/post-new.php1,537 ▲817.95 ▼5.34668.56 ▼7.1284.28 ▲32.77
Media Library /wp-admin/upload.php1,400 ▲34.31 ▲0.06102.87 ▼12.1944.30 ▼6.85

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
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/post-popularity-chart-widget-lite/post-popularity-chart-widget.php+37
    Methods with the same name as their class will not be constructors in a future version of PHP; post_popularity_graph has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_post_popularity_graph
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-popularity-chart-widget-lite/post-popularity-chart-widget.php:13

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
8 plugin tags: pupularity, chart, pupular, diagram, widget...

post-popularity-chart-widget-lite/post-popularity-chart-widget.php 92% from 13 tests

This is the main PHP file of "Post Popularity Chart Widget" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-popularity-chart-widget-lite.php" instead of "post-popularity-chart-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin238 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34827238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin