89% security-ninja-for-mainwp

Code Review | Security Ninja For MainWP

WordPress plugin Security Ninja For MainWP scored89%from 54 tests.

About plugin

  • Plugin page: security-ninja-fo...
  • Plugin version: 1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2022
  • Latest release: Apr 18, 2023
  • Number of updates: 9
  • Update frequency: every 41.8 days
  • Top authors: lkoudal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,475 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.07MB] [CPU: ▼1.97ms] Passed 4 tests

This is a short check of server-side resources used by Security Ninja For MainWP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0647.69 ▲2.65
Dashboard /wp-admin41.08 ▲37.697,729,135.71 ▲7,729,065.05
Posts /wp-admin/edit.php3.52 ▲0.1154.81 ▼1.66
Add New Post /wp-admin/post-new.php6.00 ▲0.0793.46 ▼11.46
Media Library /wp-admin/upload.php3.33 ▲0.0539.61 ▲2.60

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

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

Browser metrics Passed 4 tests

Security Ninja For MainWP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲6114.71 ▲0.351.62 ▲0.0143.39 ▲5.95
Dashboard /wp-admin2,202 ▲225.68 ▼0.0790.56 ▼1.9240.73 ▼5.02
Posts /wp-admin/edit.php2,107 ▲72.02 ▼0.0034.49 ▼1.2438.07 ▲1.98
Add New Post /wp-admin/post-new.php1,533 ▼223.24 ▲5.07678.07 ▲35.5851.84 ▼11.18
Media Library /wp-admin/upload.php1,404 ▲74.21 ▲0.05101.86 ▲1.8741.02 ▼2.93

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: hack, malware, antivirus, mainwp, security...

security-ninja-for-mainwp/security-ninja-mainwp.php 77% from 13 tests

The entry point to "Security Ninja For MainWP" version 1.6 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("security-ninja-for-mainwp.php" instead of "security-ninja-mainwp.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin962 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP12226575802
CSS310162
JavaScript2385961
XML14531
JSON1005
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.33
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods60
▷ Static methods3660.00%
▷ Public methods5795.00%
▷ Protected methods00.00%
▷ Private methods35.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
PNG images were not found in this plugin