84% allow2

Code Review | Allow2

WordPress plugin Allow2 scored 84% from 54 tests.

About plugin

  • Plugin page: allow2
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0.27+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: May 7, 2018
  • Number of updates: 6
  • Update frequency: every 3.3 days
  • Top authors: allow2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.60ms] Passed 4 tests

Analyzing server-side resources used by Allow2
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.29 ▼2.83
Dashboard /wp-admin3.39 ▲0.0844.04 ▼5.46
Posts /wp-admin/edit.php3.44 ▲0.0843.96 ▼3.04
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.45 ▼7.07
Media Library /wp-admin/upload.php3.31 ▲0.0836.58 ▲1.41
Allow2 /wp-admin/options-general.php?page=Allow23.3333.99

Server storage [IO: ▲0.10MB] [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
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Allow2: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.73 ▲0.351.83 ▲0.0439.21 ▼4.40
Dashboard /wp-admin2,210 ▲254.80 ▼0.2295.39 ▼5.9638.68 ▼10.62
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0734.65 ▼7.0631.69 ▼2.89
Add New Post /wp-admin/post-new.php1,517 ▼217.67 ▼5.45681.01 ▲12.1954.59 ▲3.65
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.10104.30 ▲4.2646.54 ▼0.08
Allow2 /wp-admin/options-general.php?page=Allow29191.8725.4525.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=Allow2
    • > Notice in wp-content/plugins/allow2/allow2_admin.php+15
    Undefined index: allow2_setup
    • > GET request to /wp-admin/options-general.php?page=Allow2
    • > Notice in wp-content/plugins/allow2/allow2_admin.php+64
    Undefined index: allow2_disconnect

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

allow2/allow2.php Passed 13 tests

The main file in "Allow2" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
127 characters long description:
The Allow2 WordPress plugin is a simple plug and play drop in component that empowers your site to offer full parental freedom.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin868 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5110163697
JavaScript31470151
CSS11017
SVG1013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-30x30.png3.16KB1.93KB▼ 38.88%