68% statistics-website

Code Review | Statistics Website

WordPress plugin Statistics Website scored68%from 54 tests.

About plugin

  • Plugin page: statistics-website
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2013
  • Latest release: May 22, 2014
  • Number of updates: 19
  • Update frequency: every 16.7 days
  • Top authors: dlozano (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /5,500 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 gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼37.41ms] Passed 4 tests

An overview of server-side resources used by Statistics Website
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.51 ▼11.60
Dashboard /wp-admin3.00 ▼0.3022.73 ▼31.75
Posts /wp-admin/edit.php3.00 ▼0.3622.78 ▼30.38
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.23 ▼69.57
Media Library /wp-admin/upload.php3.00 ▼0.2320.49 ▼17.92
Statistics Website /wp-admin/options-general.php?page=statistics3.0020.61

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
ID_website
db_upgraded
widget_theysaidso_widget
widget_recent-comments
ID_user
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Statistics Website
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲7414.78 ▲0.412.29 ▲0.0140.53 ▼3.31
Dashboard /wp-admin2,207 ▲194.85 ▼0.0397.22 ▼22.3440.54 ▼7.80
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0336.98 ▼3.1234.85 ▼0.32
Add New Post /wp-admin/post-new.php1,536 ▲1723.19 ▲0.22607.60 ▼18.5648.70 ▼11.23
Media Library /wp-admin/upload.php1,386 ▲14.16 ▼0.1596.17 ▼7.8141.20 ▼2.36
Statistics Website /wp-admin/options-general.php?page=statistics8502.0325.0726.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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 did not uninstall successfully, leaving 8 options in the database
    • ID_user
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • ID_website
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=statistics
    • > 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.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/statistics-website/statistics-website.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/statistics-website/options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
9 plugin tags: visit, referrers, count, google, real time...

statistics-website/statistics-website.php 92% from 13 tests

The primary PHP file in "Statistics Website" version 1.01 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 417 characters long)

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
There were no executable files found in this plugin78 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28978

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected