84% perfectsecurity

Code Review | PerfectSecurity

WordPress plugin PerfectSecurity scored84%from 54 tests.

About plugin

  • Plugin page: perfectsecurity
  • Plugin version: 1.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Apr 22, 2017
  • Latest release: Jun 28, 2018
  • Number of updates: 14
  • Update frequency: every 35.9 days
  • Top authors: IAmFoxx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /887 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.42ms] Passed 4 tests

This is a short check of server-side resources used by PerfectSecurity
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.58 ▼1.87
Dashboard /wp-admin3.36 ▲0.0546.62 ▼8.28
Posts /wp-admin/edit.php3.41 ▲0.0550.01 ▼1.59
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.74 ▼9.93
Media Library /wp-admin/upload.php3.28 ▲0.0539.29 ▲2.42
PerfectSecurity /wp-admin/options-general.php?page=pssec3.2537.63

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

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

Browser metrics Passed 4 tests

PerfectSecurity: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.162.07 ▲0.3141.90 ▼1.54
Dashboard /wp-admin2,207 ▲165.79 ▲0.8997.84 ▼2.6037.54 ▼2.51
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0441.02 ▲3.6335.68 ▼1.14
Add New Post /wp-admin/post-new.php1,537 ▼523.08 ▲4.86672.50 ▲33.7551.67 ▼0.57
Media Library /wp-admin/upload.php1,392 ▲104.24 ▲0.01108.61 ▲6.4647.73 ▲3.67
PerfectSecurity /wp-admin/options-general.php?page=pssec9092.1528.2328.49

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/perfectsecurity/perfectsecurity.php:14

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 93% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: "N/A"
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === perfectsecurity === )
The official readme.txt is a good inspiration

perfectsecurity/perfectsecurity.php Passed 13 tests

The main PHP file in "PerfectSecurity" ver. 1.7.8 adds more information about the plugin and also serves as the entry point for this plugin
84 characters long description:
PerfectSyntax WordPress Security, provides an extra layer of security for your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected275 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP252109275

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin