84% wp-post-stats-analysis

Code Review | WP Post Stats & Analysis

WordPress plugin WP Post Stats & Analysis scored84%from 54 tests.

About plugin

  • Plugin page: wp-post-stats-ana...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2016
  • Latest release: May 25, 2020
  • Number of updates: 11
  • Update frequency: every 119.1 days
  • Top authors: chamaraDZ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.63ms] Passed 4 tests

An overview of server-side resources used by WP Post Stats & Analysis
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.60 ▲1.33
Dashboard /wp-admin3.31 ▼0.0449.37 ▼24.49
Posts /wp-admin/edit.php3.36 ▲0.0050.14 ▼3.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.72 ▼19.87
Media Library /wp-admin/upload.php3.23 ▲0.0040.35 ▲6.92

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Post Stats & Analysis
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲6114.35 ▼0.311.93 ▲0.0947.79 ▲3.83
Dashboard /wp-admin2,213 ▲395.65 ▲0.0490.40 ▼19.2443.69 ▼1.86
Posts /wp-admin/edit.php2,118 ▲152.03 ▲0.0338.99 ▼1.6135.59 ▼0.60
Add New Post /wp-admin/post-new.php1,541 ▲1523.32 ▼0.07656.72 ▼14.2452.25 ▼19.05
Media Library /wp-admin/upload.php1,415 ▲154.21 ▲0.0499.90 ▼6.1648.37 ▲2.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please 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/wp-post-stats-analysis/wpsa_index.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (plugin page - plugin screen showing all post stats related information.)
You can take inspiration from this readme.txt

wp-post-stats-analysis/wpsa_index.php 92% from 13 tests

The primary PHP file in "WP Post Stats & Analysis" version 1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-post-stats-analysis.php" instead of "wpsa_index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1651581
CSS119029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin