84% yasp

Code Review | Yet Another Stats Plugin

WordPress plugin Yet Another Stats Plugin scored 84% from 54 tests.

About plugin

  • Plugin page: yasp
  • Plugin version: 0.1-alpha...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Aug 15, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 3
  • Update frequency: every 7.3 days
  • Top authors: mikemike86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.89ms] Passed 4 tests

An overview of server-side resources used by Yet Another Stats Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.08 ▼9.50
Dashboard /wp-admin3.33 ▲0.0253.20 ▲4.93
Posts /wp-admin/edit.php3.38 ▲0.0250.15 ▲2.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.44 ▲5.57
Media Library /wp-admin/upload.php3.25 ▲0.0233.09 ▼8.98

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Yet Another Stats Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20613.21 ▼1.361.82 ▼0.0342.96 ▲3.36
Dashboard /wp-admin2,358 ▲1704.87 ▼0.18101.93 ▼12.6342.83 ▼6.34
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0640.69 ▲1.5936.87 ▲0.83
Add New Post /wp-admin/post-new.php1,514 ▼1017.53 ▼3.58591.21 ▼36.4159.27 ▲13.72
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0195.23 ▼5.9043.34 ▲0.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/yasp/tests/test-sample.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/yasp/tests/bootstrap.php on line 6
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/yasp/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasp/yasp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
3 plugin tags: statistics, stats, number of posts

yasp/yasp.php 85% from 13 tests

The main PHP script in "Yet Another Stats Plugin" version 0.1-alpha... is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "0.1-alpha...")

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
No dangerous file extensions were detected204 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32046109
Bourne Shell115459
XML10014
YAML14012
CSS10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
There are no PNG files in this plugin