93% re-phone-cta

Code Review | RE Phone CTA

WordPress plugin RE Phone CTA scored 93% from 54 tests.

About plugin

  • Plugin page: re-phone-cta
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.17+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 5.9.2
  • First release: Aug 26, 2019
  • Latest release: Aug 26, 2019
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: thuynguyenbovn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 260 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼293.83ms] Passed 4 tests

This is a short check of server-side resources used by RE Phone CTA
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0361.13 ▲6.66
Dashboard /wp-admin3.44 ▲0.0435.96 ▼1.11
Posts /wp-admin/edit.php3.67 ▲0.0338.58 ▼2.18
Add New Post /wp-admin/post-new.php6.91 ▼0.0698.28 ▼1,170.11
Media Library /wp-admin/upload.php3.32 ▲0.0324.52 ▼1.92
Add New /wp-admin/post-new.php?post_type=re-phone-cta3.6247.04
All Items /wp-admin/edit.php?post_type=re-phone-cta3.4738.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for RE Phone CTA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,905 ▲15716.27 ▲0.9810.29 ▲4.242.42 ▲0.12
Dashboard /wp-admin2,921 ▲606.04 ▼0.14112.41 ▼13.54179.14 ▲23.82
Posts /wp-admin/edit.php2,718 ▲333.10 ▼0.1370.51 ▲7.41151.98 ▲11.93
Add New Post /wp-admin/post-new.php1,688 ▲2719.30 ▲3.61408.28 ▼13.25188.99 ▲25.07
Media Library /wp-admin/upload.php1,729 ▲345.52 ▲0.01120.47 ▼24.72196.90 ▲15.71
Add New /wp-admin/post-new.php?post_type=re-phone-cta3,2566.89117.44157.42
All Items /wp-admin/edit.php?post_type=re-phone-cta1,6635.0075.91127.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/re-phone-cta/index.php

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 issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (CTA setting)
Please take inspiration from this readme.txt

re-phone-cta/index.php 77% from 13 tests

Analyzing the main PHP file in "RE Phone CTA" version 1.1.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("re-phone-cta.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 188 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,116 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36227367
CSS3440321
PHP13525317
PO File15971111

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/cta_setting.png27.63KB8.41KB▼ 69.57%
images/phone-ring.png0.36KB0.37KB0.00%
images/icon.png1.43KB0.82KB▼ 42.75%