78% wp-theme-statistic

Code Review | WP Theme Statistic

WordPress plugin WP Theme Statistic scored78%from 54 tests.

About plugin

  • Plugin page: wp-theme-statistic
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: May 6, 2022
  • Number of updates: 7
  • Update frequency: every 144.4 days
  • Top authors: postmagthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WP Theme Statistic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0639.48 ▼5.27
Dashboard /wp-admin3.40 ▲0.0552.14 ▼7.09
Posts /wp-admin/edit.php3.51 ▲0.1150.44 ▲2.78
Add New Post /wp-admin/post-new.php5.98 ▲0.0587.65 ▼12.20
Media Library /wp-admin/upload.php3.32 ▲0.0539.21 ▲5.03

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, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Theme Statistic
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.24 ▼0.292.33 ▲0.4744.82 ▼2.18
Dashboard /wp-admin2,216 ▲365.58 ▼0.0785.60 ▼6.9039.00 ▼0.34
Posts /wp-admin/edit.php2,118 ▲182.02 ▼0.0133.64 ▼3.7037.75 ▲2.27
Add New Post /wp-admin/post-new.php1,541 ▲423.58 ▲0.07674.82 ▼5.5952.95 ▼0.73
Media Library /wp-admin/upload.php1,418 ▲184.21 ▲0.0397.45 ▼10.7843.31 ▼6.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-theme-statistic/wp-theme-statistic.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: wp theme statistic

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

"WP Theme Statistic" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 review of files and their extensions; it is not recommended to include executable files
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

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.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

Often times overlooked, PNG files can occupy unnecessary space in 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/output.png57.11KB15.73KB▼ 72.46%
assets/img/theme-slug.png118.26KB31.94KB▼ 72.99%
assets/star-rating-sprite.png1.96KB0.87KB▼ 55.43%