90% protect-wp-config-from-phishing-attacks

Code Review | Protect WP Config File from Phishing Attacks

WordPress plugin Protect WP Config File from Phishing Attacks scored90%from 54 tests.

About plugin

  • Plugin page: protect-wp-config...
  • Plugin version: 15.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Jul 5, 2013
  • Latest release: Apr 7, 2016
  • Number of updates: 9
  • Update frequency: every 111.9 days
  • Top authors: christopherross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.32ms] Passed 4 tests

Server-side resources used by Protect WP Config File from Phishing Attacks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.48 ▲3.14
Dashboard /wp-admin3.32 ▲0.0256.13 ▲4.85
Posts /wp-admin/edit.php3.37 ▲0.0145.85 ▼3.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.26 ▼5.64
Media Library /wp-admin/upload.php3.24 ▲0.0142.50 ▲5.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Protect WP Config File from Phishing Attacks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.251.69 ▼0.0842.97 ▼1.47
Dashboard /wp-admin2,195 ▲185.63 ▼0.0389.23 ▼7.7840.13 ▼3.83
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0136.88 ▼7.8536.47 ▼5.39
Add New Post /wp-admin/post-new.php1,537 ▼118.23 ▼4.68648.39 ▼19.0669.88 ▲14.27
Media Library /wp-admin/upload.php1,400 ▼04.23 ▼0.00100.71 ▼11.2844.79 ▼1.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: security, protect, config file, wp-config, phishing attacks...

protect-wp-config-from-phishing-attacks/protect-wp-config-from-phishing-attacks.php Passed 13 tests

The main PHP file in "Protect WP Config File from Phishing Attacks" ver. 15.01 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
Returns a blank white page if people try to load the wp-config file (or backups of it) in a web browser.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin310 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3129178153
PO File24280126
CSS121631

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
There were not PNG files found in your plugin