78% stop-sopa-by-zachary

Code Review | Stop SOPA by Zachary

WordPress plugin Stop SOPA by Zachary scored78%from 54 tests.

About plugin

  • Plugin page: stop-sopa-by-zachary
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Jan 18, 2012
  • Latest release: Jan 7, 2013
  • Number of updates: 19
  • Update frequency: every 18.7 days
  • Top authors: olarmarius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.13MB] [CPU: ▼11.92ms] Passed 4 tests

A check of server-side resources used by Stop SOPA by Zachary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▼0.5717.79 ▼27.75
Dashboard /wp-admin3.33 ▲0.0252.24 ▼0.27
Posts /wp-admin/edit.php3.38 ▲0.0246.80 ▼2.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.39 ▼14.04
Media Library /wp-admin/upload.php3.25 ▲0.0235.99 ▼3.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stop SOPA by Zachary
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,453 ▼31813.29 ▼1.101.14 ▼0.8015.46 ▼30.93
Dashboard /wp-admin2,206 ▲215.85 ▲0.95107.06 ▼43.0540.66 ▼5.31
Posts /wp-admin/edit.php2,089 ▲32.18 ▲0.1834.07 ▼2.7435.41 ▲1.38
Add New Post /wp-admin/post-new.php1,533 ▲1123.23 ▼0.29659.75 ▼20.1060.79 ▲6.89
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0197.98 ▼18.4449.21 ▲0.06

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/stop-sopa-by-zachary/sopa-page.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/stop-sopa-by-zachary/sopa.zachary.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

stop-sopa-by-zachary/sopa.zachary.php 92% from 13 tests

Analyzing the main PHP file in "Stop SOPA by Zachary" version 1.0
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("stop-sopa-by-zachary.php" instead of "sopa.zachary.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22833141

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
No PNG files were detected