84% hide-and-catch-email

Code Review | Hide and Catch Email

WordPress plugin Hide and Catch Email scored84%from 54 tests.

About plugin

  • Plugin page: hide-and-catch-email
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2010
  • Latest release: Dec 17, 2014
  • Number of updates: 45
  • Update frequency: every 37.3 days
  • Top authors: austyfrosty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲3.02ms] Passed 4 tests

Server-side resources used by Hide and Catch Email
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1056.82 ▲19.37
Dashboard /wp-admin3.51 ▲0.16126.32 ▲62.01
Posts /wp-admin/edit.php3.53 ▲0.1749.65 ▲3.09
Add New Post /wp-admin/post-new.php6.00 ▲0.1195.35 ▼3.17
Media Library /wp-admin/upload.php3.34 ▲0.1137.06 ▼7.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Hide and Catch Email: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11013.21 ▼1.155.54 ▲3.8553.66 ▲9.86
Dashboard /wp-admin2,259 ▲774.87 ▼0.10101.46 ▼1.3748.55 ▲3.43
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0434.22 ▼1.7532.91 ▲1.85
Add New Post /wp-admin/post-new.php6,325 ▲4,80626.10 ▲3.461,101.28 ▲508.5263.58 ▲14.44
Media Library /wp-admin/upload.php1,391 ▲34.12 ▼0.0996.29 ▼8.9640.79 ▼5.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • 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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-and-catch-email/library/admin/post-meta-box.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-and-catch-email/hide-catch-email.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-and-catch-email/library/admin/dashboard.php:17

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: catch-email, shortcode, email, content, replace...

hide-and-catch-email/hide-catch-email.php 85% from 13 tests

The main PHP script in "Hide and Catch Email" version 0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 366 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hide-and-catch-email.php" instead of "hide-catch-email.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
Good job! No executable or dangerous file extensions detected542 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3126161468
JavaScript191074

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity29.00
▷ Minimum class complexity12.00
▷ Maximum class complexity46.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
There were not PNG files found in your plugin