84% postats

Code Review | Postats

WordPress plugin Postats scored84%from 54 tests.

About plugin

  • Plugin page: postats
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Jan 24, 2016
  • Latest release: Sep 25, 2016
  • Number of updates: 4
  • Update frequency: every 61.7 days
  • Top authors: jubstuff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Postats
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.57 ▼2.25
Dashboard /wp-admin3.32 ▲0.0255.85 ▲4.49
Posts /wp-admin/edit.php3.37 ▲0.0250.17 ▼4.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.37 ▼5.11
Media Library /wp-admin/upload.php3.24 ▲0.0241.85 ▲7.56

Server storage [IO: ▲0.02MB] [DB: ▲0.31MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Postats
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.71 ▼0.661.72 ▼0.4647.48 ▲2.11
Dashboard /wp-admin2,209 ▲244.85 ▼0.05101.42 ▼12.7543.91 ▼7.29
Posts /wp-admin/edit.php2,086 ▼02.02 ▼0.0333.52 ▼2.7334.87 ▼3.96
Add New Post /wp-admin/post-new.php1,533 ▼323.31 ▲0.21686.79 ▲66.1258.39 ▲2.58
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.01111.65 ▲12.0847.74 ▲4.24

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/postats/postats.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/postats/views/stats.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: post, statistics, reading

postats/postats.php 92% from 13 tests

Analyzing the main PHP file in "Postats" version 0.1
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

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
Everything looks great! No dangerous files found in this plugin95 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3294984
CSS12011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected