88% wp-theme-statistic

Code Review | WP Theme Statistic

WordPress plugin WP Theme Statistic scored 88% from 54 tests.

About plugin

  • Plugin page: wp-theme-statistic
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 5.9.2
  • First release: Jul 30, 2019
  • Latest release: Feb 28, 2021
  • Number of updates: 6
  • Update frequency: every 96.5 days
  • Top authors: postmagthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 854 total downloads

Benchmarks

Plugin footprint Passed 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.03MB] [CPU: ▼308.22ms] Passed 4 tests

Analyzing server-side resources used by WP Theme Statistic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.4550.47 ▲31.88
Dashboard /wp-admin3.47 ▲0.0633.57 ▼0.35
Posts /wp-admin/edit.php3.70 ▲0.0537.80 ▼0.21
Add New Post /wp-admin/post-new.php6.94 ▼0.0494.14 ▼1,235.18
Media Library /wp-admin/upload.php3.35 ▲0.0525.54 ▲2.85

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Theme Statistic
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲6515.98 ▲0.316.65 ▲0.282.73 ▲0.68
Dashboard /wp-admin2,907 ▲466.14 ▼0.05122.74 ▼11.19162.07 ▲2.29
Posts /wp-admin/edit.php2,710 ▲193.24 ▲0.0064.54 ▼3.51140.31 ▼6.51
Add New Post /wp-admin/post-new.php1,683 ▲2218.84 ▲2.98384.92 ▼30.26155.15 ▼0.68
Media Library /wp-admin/upload.php1,720 ▲255.52 ▼0.02143.86 ▲5.45186.77 ▲1.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-theme-statistic/wp-theme-statistic.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-theme-statistic/templates/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
1 plugin tags: wp theme statistic

wp-theme-statistic/wp-theme-statistic.php 92% from 13 tests

The main PHP file in "WP Theme Statistic" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 305 characters long)

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
Success! There were no dangerous files found in this plugin371 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP67153252
CSS2190119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/theme-info.png14.51KB5.01KB▼ 65.46%
assets/img/theme-slug.png118.26KB31.94KB▼ 72.99%
assets/star-rating-sprite.png1.96KB0.87KB▼ 55.43%
assets/img/output.png57.11KB15.73KB▼ 72.46%