84% hotline-phone-ring

Code Review | Hotline Phone Ring

WordPress plugin Hotline Phone Ring scored84%from 54 tests.

About plugin

  • Plugin page: hotline-phone-ring
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 1, 2018
  • Latest release: Jun 2, 2021
  • Number of updates: 24
  • Update frequency: every 44.5 days
  • Top authors: namncn (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10,000+ active /46,580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.46ms] Passed 4 tests

Server-side resources used by Hotline Phone Ring
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.02 ▲3.41
Dashboard /wp-admin3.37 ▲0.0751.73 ▲0.47
Posts /wp-admin/edit.php3.48 ▲0.1349.21 ▼9.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.86 ▼10.99
Media Library /wp-admin/upload.php3.29 ▲0.0634.34 ▼1.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Hotline Phone Ring
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9514.41 ▲0.041.93 ▼0.1747.84 ▲1.80
Dashboard /wp-admin2,230 ▲535.86 ▲0.1792.02 ▲1.7739.57 ▼7.39
Posts /wp-admin/edit.php2,140 ▲432.31 ▲0.2641.41 ▲4.3835.22 ▲0.16
Add New Post /wp-admin/post-new.php1,553 ▼317.59 ▼0.74672.90 ▲28.9236.16 ▼10.76
Media Library /wp-admin/upload.php1,435 ▲384.44 ▲0.2498.54 ▼7.8843.05 ▼1.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hotline-phone-ring/includes/backend.php:6

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

readme.txt 94% from 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
These attributes need your attention: Please take inspiration from this readme.txt

hotline-phone-ring/hotline-phone-ring.php Passed 13 tests

The principal PHP file in "Hotline Phone Ring" v. 2.0.6 is loaded by WordPress automatically on each request
28 characters long description:
Fixed Hotline on the screen.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin751 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS2221349
PHP455137327
PO File1202072
JavaScript1213

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-1.png0.93KB0.37KB▼ 59.98%
assets/images/icon-2.png0.62KB0.63KB0.00%