78% net-neutrality

Code Review | Net Neutrality

WordPress plugin Net Neutrality scored78%from 54 tests.

About plugin

  • Plugin page: net-neutrality
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: Jul 12, 2017
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: ebinnion (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,174 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.29ms] Passed 4 tests

An overview of server-side resources used by Net Neutrality
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0243.81 ▼0.65
Dashboard /wp-admin3.38 ▲0.0356.84 ▲5.09
Posts /wp-admin/edit.php3.49 ▲0.0951.72 ▼2.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0386.79 ▼17.28
Media Library /wp-admin/upload.php3.30 ▲0.0335.96 ▼5.00
Fight for Net Neutrality /wp-admin/options-general.php?page=net-neutrality3.2737.14

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Net Neutrality
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.47 ▼0.171.72 ▲0.1343.61 ▲0.26
Dashboard /wp-admin2,196 ▲195.56 ▼0.0987.68 ▼5.8037.27 ▼3.76
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0635.69 ▼4.8834.12 ▼0.63
Add New Post /wp-admin/post-new.php1,531 ▲523.02 ▲0.01630.61 ▼44.8967.59 ▲16.21
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0597.06 ▼22.9243.99 ▼2.30
Fight for Net Neutrality /wp-admin/options-general.php?page=net-neutrality8122.2924.3626.31

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=net-neutrality
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=net-neutrality
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/net-neutrality/net-neutrality-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/net-neutrality/net-neutrality.php:160

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: net neutrality

net-neutrality/net-neutrality.php 92% from 13 tests

The main PHP file in "Net Neutrality" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin399 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1277202
PHP24117143
JavaScript113354

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png15.70KB7.05KB▼ 55.08%