79% ph-protection

Code Review | Proxy Hacking Protection

WordPress plugin Proxy Hacking Protection scored79%from 54 tests.

About plugin

  • Plugin page: ph-protection
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Nov 13, 2015
  • Number of updates: 11
  • Update frequency: every 9.6 days
  • Top authors: niyari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,742 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.71ms] Passed 4 tests

Server-side resources used by Proxy Hacking Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0147.49 ▲7.16
Dashboard /wp-admin3.34 ▲0.0353.73 ▲1.83
Posts /wp-admin/edit.php3.39 ▲0.0346.94 ▼5.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.89 ▼3.38
Media Library /wp-admin/upload.php3.26 ▲0.0335.45 ▼3.44
Proxy Hacking Protection /wp-admin/options-general.php?page=phprot_setting_menu3.2032.76

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: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Proxy Hacking Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.57 ▲0.222.00 ▲0.4238.29 ▼5.40
Dashboard /wp-admin2,199 ▲195.65 ▲0.0687.86 ▼4.1536.57 ▼3.87
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0336.66 ▼0.4936.22 ▼3.37
Add New Post /wp-admin/post-new.php1,530 ▲223.05 ▲1.99638.87 ▼65.2960.86 ▲2.41
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.06109.15 ▼2.0947.62 ▼3.44
Proxy Hacking Protection /wp-admin/options-general.php?page=phprot_setting_menu8172.0223.8861.44

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=phprot_setting_menu
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=phprot_setting_menu
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/ph-protection/ph-prot-main.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ph-protection/admin-settings.php:163
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ph-protection/ph-protection.php:20

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: hacking, proxy, protection, hack, google

ph-protection/ph-protection.php Passed 13 tests

The main PHP script in "Proxy Hacking Protection" version 0.0.1 is automatically included on every request by WordPress
43 characters long description:
Proxy Hacking Protection (WordPress Plugin)

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
There were no executable files found in this plugin144 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43291144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected