84% hlidac-statu

Code Review | Hlídač Státu

WordPress plugin Hlídač Státu scored84%from 54 tests.

About plugin

  • Plugin page: hlidac-statu
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Nov 24, 2020
  • Number of updates: 4
  • Update frequency: every 157.3 days
  • Top authors: hlidacstatu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /475 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.25ms] Passed 4 tests

An overview of server-side resources used by Hlídač Státu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.70 ▼8.00
Dashboard /wp-admin3.31 ▲0.0042.71 ▼8.95
Posts /wp-admin/edit.php3.36 ▲0.0049.33 ▲6.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.97 ▼7.98
Media Library /wp-admin/upload.php3.23 ▲0.0034.79 ▼0.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hlídač Státu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.84 ▲0.541.81 ▼0.0041.62 ▼6.17
Dashboard /wp-admin2,209 ▲244.82 ▼1.05111.12 ▼8.8543.50 ▲1.47
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0036.38 ▼4.0834.83 ▼0.99
Add New Post /wp-admin/post-new.php1,534 ▲123.20 ▲0.08683.84 ▲43.7355.58 ▼5.05
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0997.93 ▼0.3542.01 ▲0.93

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/hlidac-statu/hlidacwp.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
3 plugin tags: widget, hlidacstatu, hlidacsmluv

hlidac-statu/hlidacwp.php 92% from 13 tests

The entry point to "Hlídač Státu" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hlidac-statu.php" instead of "hlidacwp.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
There were no executable files found in this plugin35 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2122635

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin