89% wp-drinking-age

Code Review | WP Drinking Age

WordPress plugin WP Drinking Age scored89%from 54 tests.

About plugin

  • Plugin page: wp-drinking-age
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Dec 5, 2016
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: ryankozak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,134 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.07MB] [CPU: ▼4.22ms] Passed 4 tests

A check of server-side resources used by WP Drinking Age
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.40 ▼2.71
Dashboard /wp-admin3.39 ▲0.0852.53 ▲6.29
Posts /wp-admin/edit.php3.51 ▲0.1554.20 ▲5.80
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.13 ▼14.54
Media Library /wp-admin/upload.php3.29 ▲0.0632.09 ▼5.44
WP Drinking Age /wp-admin/options-general.php?page=wp-drinking-age3.2935.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 18 new options
New WordPress options
can_compress_scripts
dagw_redirect
dagw_gate_border_width
widget_recent-posts
dagw_deny_timeout
widget_recent-comments
dagw_message
db_upgraded
theysaidso_admin_options
dagw_logo_url
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Drinking Age
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,842 ▲2,09615.18 ▲0.839.01 ▲7.3777.59 ▲36.15
Dashboard /wp-admin2,354 ▲1666.45 ▲1.53133.18 ▲30.5241.42 ▼0.66
Posts /wp-admin/edit.php2,260 ▲1713.32 ▲1.3454.23 ▲14.5335.49 ▼1.45
Add New Post /wp-admin/post-new.php1,521 ▲223.20 ▲0.10625.39 ▼60.3136.87 ▼21.41
Media Library /wp-admin/upload.php1,393 ▲84.22 ▲0.1279.76 ▼40.4941.58 ▼7.19
WP Drinking Age /wp-admin/options-general.php?page=wp-drinking-age1,0763.0338.1126.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-drinking-age === )
The official readme.txt is a good inspiration

wp-drinking-age/wp-drinking-age.php Passed 13 tests

Analyzing the main PHP file in "WP Drinking Age" version 0.1.0
71 characters long description:
Easily implement a drinking age gateway on your WordPress installation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin681 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2190453
PHP46423181
CSS351247

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
There were not PNG files found in your plugin