10% personal-statistics-for-authors

Code Review | Personal Statistics for Authors

WordPress plugin Personal Statistics for Authors scored10%from 54 tests.

About plugin

  • Plugin page: personal-statisti...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 31, 2013
  • Latest release: Jun 5, 2013
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: Peexeo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,006 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/personal-statistics-for-authors/libraries/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.52MB] [CPU: ▼55.49ms] Passed 4 tests

Analyzing server-side resources used by Personal Statistics for Authors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.47 ▼1.008.28 ▼33.63
Dashboard /wp-admin2.49 ▼0.827.97 ▼41.92
Posts /wp-admin/edit.php2.49 ▼0.8710.84 ▼40.43
Add New Post /wp-admin/post-new.php2.49 ▼3.408.83 ▼105.99
Media Library /wp-admin/upload.php2.49 ▼0.748.78 ▼26.80
My Dashboard /wp-admin/admin.php?page=PSFA/my-dashboard.php2.498.15
Authors /wp-admin/admin.php?page=PSFA/authors.php2.499.10
Averages /wp-admin/admin.php?page=PSFA/averages.php2.498.31
Help /wp-admin/admin.php?page=PSFA/help.php2.4910.11
Personal Statistics for Authors /wp-admin/options-general.php?page=PSFA2.499.62

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 107 new files
Database: 1 new table, 7 new options
New tables
wp_psfa
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
psfa_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Personal Statistics for Authors
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲9515.12 ▲0.751.74 ▼0.1342.58 ▲0.57
Dashboard /wp-admin2,282 ▲1046.93 ▲1.22108.08 ▼0.1882.94 ▲39.62
Posts /wp-admin/edit.php2,156 ▲532.50 ▲0.5243.41 ▲1.3336.91 ▲0.51
Add New Post /wp-admin/post-new.php1,572 ▲4622.64 ▼0.47698.64 ▲6.4937.06 ▼22.56
Media Library /wp-admin/upload.php1,453 ▲594.62 ▲0.32101.14 ▼6.7592.96 ▲47.97
My Dashboard /wp-admin/admin.php?page=PSFA/my-dashboard.php8301.9127.5324.63
Authors /wp-admin/admin.php?page=PSFA/authors.php8091.9831.4727.21
Averages /wp-admin/admin.php?page=PSFA/averages.php8271.9526.7126.63
Help /wp-admin/admin.php?page=PSFA/help.php9341.9431.2330.66
Personal Statistics for Authors /wp-admin/options-general.php?page=PSFA9321.9427.2936.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/personal-statistics-for-authors/libraries/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • psfa_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=PSFA
    • > Deprecated in wp-content/plugins/personal-statistics-for-authors/libraries/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/admin.php?page=PSFA/my-dashboard.php
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=PSFA/averages.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=PSFA/averages.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/options-general.php?page=PSFA
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=PSFA
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 71× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/personal-statistics-for-authors/templates/promo.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_StorageService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_DriveService.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/personal-statistics-for-authors/templates/dashboard_widget_template.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_ComputeService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_PagespeedonlineService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_FusiontablesService.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_YouTubeService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/personal-statistics-for-authors/libraries/src/contrib/Google_BigqueryService.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/personal-statistics-for-authors/templates/inputs/client_secret.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === personal-statistics-for-authors === )
  • Screenshots: A description for screenshot #4 is missing in personal-statistics-for-authors/assets to your readme.txt
Please take inspiration from this readme.txt

personal-statistics-for-authors/personal-statistics-for-authors.php 92% from 13 tests

Analyzing the main PHP file in "Personal Statistics for Authors" version 1.0.1
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 354 characters long)

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
Everything looks great! No dangerous files found in this plugin40,015 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP802,08010,03239,503
JavaScript42424233
PO File173145156
CSS1230123

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.91
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes993
▷ Abstract classes40.40%
▷ Concrete classes98999.60%
▷ Final classes00.00%
Methods8,385
▷ Static methods180.21%
▷ Public methods8,35899.68%
▷ Protected methods40.05%
▷ Private methods230.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants937.50%
▷ Class constants1562.50%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon32.png1.84KB1.52KB▼ 17.32%
screenshot-1.png44.27KB14.94KB▼ 66.25%
screenshot-2.png66.39KB24.22KB▼ 63.51%
screenshot-4.png100.23KB44.26KB▼ 55.85%
images/icon16.png1.51KB0.85KB▼ 43.62%