68% contact-us-by-lord-linus

Code Review | Contact Us By Lord Linus

WordPress plugin Contact Us By Lord Linus scored68%from 54 tests.

About plugin

  • Plugin page: contact-us-by-lor...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2+
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Aug 21, 2015
  • Number of updates: 52
  • Update frequency: every 16.8 days
  • Top authors: lordlinus (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

90+ active /14,148 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Contact Us By Lord Linus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.65 ▲2.24
Dashboard /wp-admin3.37 ▲0.0350.81 ▼13.25
Posts /wp-admin/edit.php3.42 ▲0.0745.60 ▼0.49
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.34 ▼9.07
Media Library /wp-admin/upload.php3.29 ▲0.0638.11 ▲5.53
Contact Us /wp-admin/admin.php?page=contect-us3.2330.93
Uninstall /wp-admin/admin.php?page=uninstall3.2633.39
Embed on Facebook /wp-admin/admin.php?page=facebookembd3.2630.95
Entries /wp-admin/admin.php?page=entries-lord3.2330.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
Lord_linus_contact_form
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Contact Us By Lord Linus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.28 ▼1.021.63 ▼0.1041.35 ▼2.76
Dashboard /wp-admin2,227 ▲394.87 ▼1.01102.23 ▼0.3881.23 ▲40.62
Posts /wp-admin/edit.php2,128 ▲602.02 ▼0.0235.32 ▼0.6133.98 ▼5.78
Add New Post /wp-admin/post-new.php1,380 ▼14416.65 ▼6.43679.08 ▲5.2157.94 ▲6.14
Media Library /wp-admin/upload.php1,421 ▲334.14 ▼0.05111.28 ▼1.3666.29 ▲20.94
Contact Us /wp-admin/admin.php?page=contect-us9362.0824.9626.90
Uninstall /wp-admin/admin.php?page=uninstall8202.1723.9624.62
Embed on Facebook /wp-admin/admin.php?page=facebookembd9352.0224.3928.92
Entries /wp-admin/admin.php?page=entries-lord8212.0125.2633.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • Lord_linus_contact_form
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=entries-lord
    • > Notice in wp-content/plugins/contact-us-by-lord-linus/contact-us.php+40
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-us-by-lord-linus/contact-us.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-us-by-lord-linus/facebookembd.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-us-by-lord-linus/contact-us-by-lord-linus.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/contact-us-by-lord-linus/install-script.php:13

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

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Contact Us Form on a page), #2 (Entries into admin dashboard)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === contact-us-by-lord-linus === )
You can look at the official readme.txt

contact-us-by-lord-linus/contact-us.php 92% from 13 tests

The principal PHP file in "Contact Us By Lord Linus" v. 2.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-us-by-lord-linus.php" instead of "contact-us.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin5,658 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2893394,737
PHP58626911
JavaScript20510

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity11.67
▷ Minimum method complexity4.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png36.49KB15.04KB▼ 58.78%
sms.png1.01KB0.95KB▼ 6.64%
screenshot-1.png72.51KB29.66KB▼ 59.09%
bootstrap-assets/css/close.png1.87KB1.74KB▼ 6.60%