77% ppo-call-to-actions

Code Review | PPO Call To Actions

WordPress plugin PPO Call To Actions scored 77% from 54 tests.

About plugin

  • Plugin page: ppo-call-to-actions
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 10, 2017
  • Latest release: Mar 19, 2020
  • Number of updates: 3
  • Update frequency: every 297.7 days
  • Top authors: thangnv27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,829 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.57MB] [CPU: ▼16.26ms] Passed 4 tests

This is a short check of server-side resources used by PPO Call To Actions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.24 ▼3.97
Dashboard /wp-admin3.43 ▲0.1247.44 ▲0.42
Posts /wp-admin/edit.php3.48 ▲0.1251.60 ▲3.85
Add New Post /wp-admin/post-new.php3.25 ▼2.6338.21 ▼61.66
Media Library /wp-admin/upload.php3.35 ▲0.1234.50 ▲0.18
PPO Call To Actions /wp-admin/options-general.php?page=PPOCTA3.2931.32

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

Browser metrics Passed 4 tests

An overview of browser requirements for PPO Call To Actions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.48 ▲0.101.76 ▼0.2038.35 ▼3.72
Dashboard /wp-admin2,210 ▲224.85 ▼1.04108.62 ▼3.0540.44 ▼3.37
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0641.02 ▼0.8634.38 ▼3.51
Add New Post /wp-admin/post-new.php6,721 ▲5,18720.15 ▼2.88973.00 ▲323.2960.43 ▼3.61
Media Library /wp-admin/upload.php1,392 ▲104.29 ▲0.0397.07 ▼5.3241.82 ▼1.43
PPO Call To Actions /wp-admin/options-general.php?page=PPOCTA1,0012.2023.4024.20

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=PPOCTA
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ppo-call-to-actions/call2actions.php:23

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

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (Settings page), #2 (Call and Register buttons)
The official readme.txt is a good inspiration

ppo-call-to-actions/call2actions.php 85% from 13 tests

The entry point to "PPO Call To Actions" version 0.1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 166 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ppo-call-to-actions.php" instead of "call2actions.php")

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
Success! There were no dangerous files found in this plugin702 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11427702

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity76.00
▷ Minimum class complexity76.00
▷ Maximum class complexity76.00
Average method complexity10.38
▷ Minimum method complexity2.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 1.23MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.72KB13.28KB▼ 48.37%
screenshot-6.png256.97KB100.63KB▼ 60.84%
screenshot-2.png21.24KB9.92KB▼ 53.30%
screenshot-3.png264.92KB110.97KB▼ 58.11%
images/messenger.png2.66KB1.83KB▼ 31.11%