84% admins-post-statistics

Code Review | Admins Post Statistics

WordPress plugin Admins Post Statistics scored84%from 54 tests.

About plugin

  • Plugin page: admins-post-stati...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2017
  • Latest release: Nov 11, 2017
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: hindshalfeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.52ms] Passed 4 tests

Analyzing server-side resources used by Admins Post Statistics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.50 ▲1.39
Dashboard /wp-admin3.35 ▲0.0552.19 ▲1.44
Posts /wp-admin/edit.php3.41 ▲0.0551.82 ▲4.65
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.16 ▼3.87
Media Library /wp-admin/upload.php3.27 ▲0.0435.21 ▼1.04
Admin Statistics /wp-admin/edit.php?page=admin_statistics3.2433.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Admins Post Statistics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.64 ▼0.641.79 ▼0.2639.95 ▼5.51
Dashboard /wp-admin2,210 ▲414.85 ▼0.05111.25 ▼21.1041.66 ▼4.59
Posts /wp-admin/edit.php2,118 ▲292.26 ▲0.2447.12 ▲12.2337.48 ▲2.86
Add New Post /wp-admin/post-new.php1,536 ▲2223.27 ▲5.87658.66 ▼24.4654.19 ▲2.56
Media Library /wp-admin/upload.php1,386 ▼24.20 ▼0.1195.52 ▼17.6940.67 ▼8.93
Admin Statistics /wp-admin/edit.php?page=admin_statistics8371.9734.1035.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admins-post-statistics/admin-post-count.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admins-post-statistics/count-views-column.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: post views, admin, posts between two dates, post count, shalfeh

admins-post-statistics/AdminsPostStatistics.php 92% from 13 tests

Analyzing the main PHP file in "Admins Post Statistics" version 1.0.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("admins-post-statistics.php" instead of "AdminsPostStatistics.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
Good job! No executable or dangerous file extensions detected3,133 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS51071302,870
PHP313918256
JavaScript1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-icons_2e83ff_256x240.png4.57KB4.18KB▼ 8.43%
css/smoothness/images/ui-icons_cd0a0a_256x240.png4.57KB4.18KB▼ 8.43%
css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.38KB0.15KB▼ 61.54%
css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.26KB0.09KB▼ 66.79%
css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.12KB▼ 67.68%