78% ldw-mobile-contact-optimizer

Code Review | LDW Mobile Contact Optimizer

WordPress plugin LDW Mobile Contact Optimizer scored78%from 54 tests.

About plugin

  • Plugin page: ldw-mobile-contac...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2015
  • Latest release: Jan 17, 2017
  • Number of updates: 11
  • Update frequency: every 40.8 days
  • Top authors: lamourduweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /1,827 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.61MB] [CPU: ▼15.44ms] Passed 4 tests

This is a short check of server-side resources used by LDW Mobile Contact Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.57 ▼4.95
Dashboard /wp-admin3.38 ▲0.0755.84 ▲1.48
Posts /wp-admin/edit.php3.50 ▲0.1457.74 ▲10.80
Add New Post /wp-admin/post-new.php3.23 ▼2.6640.54 ▼63.34
Media Library /wp-admin/upload.php3.31 ▲0.0741.92 ▲5.04
LDW Mobile Contact Optimizer /wp-admin/options-general.php?page=ldw-mco3.2537.86

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LDW Mobile Contact Optimizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.72 ▼0.468.88 ▲6.5440.00 ▼2.02
Dashboard /wp-admin2,199 ▲225.58 ▼0.0984.95 ▼5.9839.43 ▼1.73
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0138.98 ▲2.1137.46 ▼0.76
Add New Post /wp-admin/post-new.php1,531 ▲523.02 ▲0.06692.14 ▼36.1557.39 ▲0.77
Media Library /wp-admin/upload.php1,401 ▲44.19 ▼0.02108.15 ▼25.7947.12 ▲1.33
LDW Mobile Contact Optimizer /wp-admin/options-general.php?page=ldw-mco1,2832.4161.4033.90

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • ldw_mco
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ldw-mco
    • > Notice in wp-content/plugins/ldw-mobile-contact-optimizer/index.php+137
    Undefined index: custom

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ldw-mobile-contact-optimizer/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: contact, e-mail, mobile, phone, footer...

ldw-mobile-contact-optimizer/index.php 85% from 13 tests

The main PHP file in "LDW Mobile Contact Optimizer" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("ldw-mobile-contact-optimizer.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin206 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12320198
JavaScript1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/lamour-du-web.png15.67KB9.02KB▼ 42.48%