89% mobile-contact-line

Code Review | Mobile Contact Line

WordPress plugin Mobile Contact Line scored89%from 54 tests.

About plugin

  • Plugin page: mobile-contact-line
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 29
  • Update frequency: every 41.5 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /2,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.09ms] Passed 4 tests

Server-side resources used by Mobile Contact Line
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0744.02 ▼1.35
Dashboard /wp-admin3.38 ▼0.0151.94 ▼11.82
Posts /wp-admin/edit.php3.49 ▲0.0958.28 ▲6.67
Add New Post /wp-admin/post-new.php5.96 ▲0.0395.29 ▲2.15
Media Library /wp-admin/upload.php3.30 ▲0.0354.91 ▲19.81
Mobile Contact Line /wp-admin/options-general.php?page=yydev-mobile-line3.3940.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
yydev_mobile_line_timestamp
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
yydev_mobile_line
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Mobile Contact Line
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.38 ▲0.031.76 ▲0.1945.81 ▲7.40
Dashboard /wp-admin2,196 ▲265.59 ▼0.0390.93 ▼8.0442.57 ▲2.33
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0538.60 ▲2.8437.62 ▲1.16
Add New Post /wp-admin/post-new.php1,529 ▲122.83 ▼0.40660.22 ▼54.2953.39 ▼14.64
Media Library /wp-admin/upload.php1,407 ▲74.32 ▲0.0696.19 ▼12.9544.66 ▼3.56
Mobile Contact Line /wp-admin/options-general.php?page=yydev-mobile-line1,5772.9942.5839.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • yydev_mobile_line_timestamp
    • widget_theysaidso_widget
    • yydev_mobile_line
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

mobile-contact-line/index.php 92% from 13 tests

The main file in "Mobile Contact Line" v. 2.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mobile-contact-line.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
No dangerous file extensions were detected1,070 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP94392031,070

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1578.95%
▷ Anonymous functions421.05%
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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.03KB3.13KB0.00%
images/mobile-line.png1.82KB1.91KB0.00%