84% my-security

Code Review | MY SECURITY

WordPress plugin MY SECURITY scored84%from 54 tests.

About plugin

  • Plugin page: my-security
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2022
  • Latest release: Jan 24, 2022
  • Number of updates: 2
  • Update frequency: every 8.0 days
  • Top authors: creativestudiollc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /233 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
This plugin's installer ran successfully

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

A check of server-side resources used by MY SECURITY
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.79 ▼14.13
Dashboard /wp-admin3.31 ▲0.0041.04 ▼7.00
Posts /wp-admin/edit.php3.36 ▲0.0045.85 ▲1.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.55 ▼19.42
Media Library /wp-admin/upload.php3.23 ▲0.0033.10 ▲1.18

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

MY SECURITY: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲6313.20 ▼1.031.59 ▼0.7139.89 ▼8.55
Dashboard /wp-admin2,206 ▲155.86 ▲0.97109.46 ▲9.4844.23 ▲3.76
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0439.25 ▲1.9034.40 ▲1.42
Add New Post /wp-admin/post-new.php1,514 ▼1917.56 ▼5.74664.80 ▼4.3071.59 ▲18.59
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0295.82 ▼2.9844.63 ▼1.00

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-security/my_security.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Plugin general settings), #2 (Individual page/post setting)
The official readme.txt might help

my-security/my_security.php 92% from 13 tests

The main PHP file in "MY SECURITY" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("my-security.php" instead of "my_security.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
No dangerous file extensions were detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131610

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected