73% phone2app

Code Review | phone2app : formulario de contacto y llamadas

WordPress plugin phone2app : formulario de contacto y llamadas scored73%from 54 tests.

About plugin

  • Plugin page: phone2app
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Dec 14, 2015
  • Number of updates: 31
  • Update frequency: every 0.2 days
  • Top authors: Aportamedia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /9,564 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
The plugin installed gracefully, with no errors

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

Server-side resources used by phone2app : formulario de contacto y llamadas
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.27 ▼0.48
Dashboard /wp-admin3.33 ▼0.0248.76 ▼16.15
Posts /wp-admin/edit.php3.38 ▲0.0244.79 ▼1.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.07 ▼1.74
Media Library /wp-admin/upload.php3.25 ▲0.0236.99 ▲4.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 38 new files
Database: 2 new tables, 6 new options
New tables
wp_phone2app_form
wp_phone2app_user
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for phone2app : formulario de contacto y llamadas
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.74 ▲0.372.36 ▲0.6244.93 ▼0.95
Dashboard /wp-admin2,202 ▲145.82 ▼0.09113.17 ▼7.4984.45 ▲38.38
Posts /wp-admin/edit.php2,103 ▲141.99 ▼0.0235.12 ▼1.4533.20 ▼3.25
Add New Post /wp-admin/post-new.php1,687 ▲16824.13 ▲1.08715.12 ▲69.7569.31 ▲18.83
Media Library /wp-admin/upload.php1,396 ▲54.18 ▲0.00111.88 ▲16.5150.03 ▲9.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_phone2app_form
    • wp_phone2app_user
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/phone2app/DAO/index.php
    • > /wp-content/plugins/phone2app/phone2app.php
    • > /wp-content/plugins/phone2app/phone2appUserService.php
    • > /wp-content/plugins/phone2app/DTO/index.php
    • > /wp-content/plugins/phone2app/phone2appFormService.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please describe screenshot #300 in phone2app/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

phone2app/phone2app.php 92% from 13 tests

The primary PHP file in "phone2app : formulario de contacto y llamadas" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 370 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin15,298 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42,54715,15411,713
CSS657152,462
SVG100655
PHP1050165335
HTML12424133

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo.png9.04KB2.88KB▼ 68.10%
admin/img/icon.png0.60KB0.76KB0.00%
img/logo.png9.04KB2.88KB▼ 68.10%
img/icon.png0.60KB0.76KB0.00%
img/favicon-192x192.png7.31KB3.38KB▼ 53.72%