10% wp-parsi-statistics

Code Review | WP-Parsi Statistics

WordPress plugin WP-Parsi Statistics scored 10% from 54 tests.

About plugin

  • Plugin page: wp-parsi-statistics
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Oct 26, 2013
  • Latest release: Feb 5, 2014
  • Number of updates: 17
  • Update frequency: every 6.1 days
  • Top authors: AliRezaPro (64.71%)man4toman (41.18%)

Code review

54 tests

User reviews

6 reviews

Install metrics

60+ active / 7,798 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-parsi-statistics/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WPPST_Widget has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼48.89ms] Passed 4 tests

A check of server-side resources used by WP-Parsi Statistics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.58 ▼32.16
Dashboard /wp-admin2.30 ▼1.0011.94 ▼32.95
Posts /wp-admin/edit.php2.31 ▼1.0511.84 ▼38.49
Add New Post /wp-admin/post-new.php2.30 ▼3.5811.07 ▼91.95
Media Library /wp-admin/upload.php2.30 ▼0.9211.85 ▼19.25

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: 3 new tables, 8 new options
New tables
wp_ip_log
wp_p_statistic
wp_static
New WordPress options
widget_wppsts-widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
wp_parsi_statistics_ver
theysaidso_admin_options

Browser metrics Passed 4 tests

WP-Parsi Statistics: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲6613.19 ▼1.202.20 ▲0.1044.63 ▼1.75
Dashboard /wp-admin2,209 ▲274.85 ▼1.0595.90 ▼5.1438.09 ▼2.05
Posts /wp-admin/edit.php2,089 ▼02.08 ▲0.0836.91 ▼4.4432.83 ▼3.85
Add New Post /wp-admin/post-new.php1,514 ▼2117.66 ▼5.60676.79 ▲44.6351.67 ▼1.84
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0195.00 ▼10.6440.54 ▼6.82

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WPPST_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_wppsts-widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-parsi-statistics/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-parsi-statistics/upgrade.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-parsi-statistics/install.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-parsi-statistics/wp-parsi-statistics.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-parsi-statistics/wp-parsi-statistics.php Passed 13 tests

The primary PHP file in "WP-Parsi Statistics" version 1.5 is used by WordPress to initiate all plugin functionality
128 characters long description:
This plugin provide you full statistic of your site. You can show statistics with widget or many usefull function in your theme.

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
Good job! No executable or dangerous file extensions detected938 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP920042827
PO File1384387
CSS10024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.20
▷ Minimum class complexity5.00
▷ Maximum class complexity35.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods5385.48%
▷ Protected methods00.00%
▷ Private methods914.52%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.37KB8.17KB▼ 65.05%