67% call-now-coccoc-pht-blog

Code Review | Call Now PHT Blog

WordPress plugin Call Now PHT Blog scored 67% from 54 tests.

About plugin

  • Plugin page: call-now-coccoc-p...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 23, 2019
  • Latest release: Mar 4, 2020
  • Number of updates: 28
  • Update frequency: every 14.5 days
  • Top authors: thanhph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 4,517 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.77MB] [CPU: ▼51.78ms] Passed 4 tests

Analyzing server-side resources used by Call Now PHT Blog
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.246.64 ▼35.99
Dashboard /wp-admin2.23 ▼1.075.83 ▼44.76
Posts /wp-admin/edit.php2.24 ▼1.127.27 ▼33.72
Add New Post /wp-admin/post-new.php2.23 ▼3.656.55 ▼92.66
Media Library /wp-admin/upload.php2.23 ▼0.996.09 ▼28.23
Call Now PHT /wp-admin/options-general.php?page=call-now-pht2.246.77

Server storage [IO: ▲0.09MB] [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: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Call Now PHT Blog: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22313.91 ▼0.495.95 ▲4.2146.11 ▼0.20
Dashboard /wp-admin2,225 ▲435.02 ▲0.14110.25 ▼7.5641.02 ▼8.04
Posts /wp-admin/edit.php2,098 ▲92.29 ▲0.2441.76 ▲5.2739.54 ▲5.07
Add New Post /wp-admin/post-new.php1,537 ▲917.79 ▼0.65652.77 ▲54.4237.75 ▼15.87
Media Library /wp-admin/upload.php1,420 ▲294.35 ▲0.1988.48 ▼12.0839.84 ▼2.71
Call Now PHT /wp-admin/options-general.php?page=call-now-pht1,0032.3542.1229.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Easy_Callnow_i18n' does not have a method 'load_plugin_textdomain'
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=call-now-pht
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Easy_Callnow_i18n' does not have a method 'load_plugin_textdomain'

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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/call-now-coccoc-pht-blog/admin/partials/easy-callnow-admin-display.php
    • > /wp-content/plugins/call-now-coccoc-pht-blog/public/partials/easy-callnow-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in call-now-coccoc-pht-blog/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === call-now-coccoc-pht-blog === )
You can take inspiration from this readme.txt

call-now-coccoc-pht-blog/easy-callnow.php 77% from 13 tests

The main PHP file in "Call Now PHT Blog" ver. 2.4.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 154 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("call-now-coccoc-pht-blog.php" instead of "easy-callnow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin573 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12132565286
CSS2110216
PO File2183662
JavaScript23279

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.62
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/phone-ring.png0.36KB0.37KB0.00%