79% phonegap-connect

Code Review | Phonegap Connect - Plugin Connection for your Wordpress Site from App

WordPress plugin Phonegap Connect - Plugin Connection for your Wordpress Site from App scored79%from 54 tests.

About plugin

  • Plugin page: phonegap-connect
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: May 16, 2017
  • Number of updates: 15
  • Update frequency: every 8.9 days
  • Top authors: DanielRiera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,699 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼39.89ms] Passed 4 tests

This is a short check of server-side resources used by Phonegap Connect - Plugin Connection for your Wordpress Site from App
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.93 ▲5.80
Dashboard /wp-admin3.04 ▼0.2725.62 ▼27.19
Posts /wp-admin/edit.php3.04 ▼0.3222.83 ▼29.53
Add New Post /wp-admin/post-new.php3.04 ▼2.8522.32 ▼86.83
Media Library /wp-admin/upload.php3.04 ▼0.1921.29 ▼16.01

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Phonegap Connect - Plugin Connection for your Wordpress Site from App: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.15 ▼0.191.89 ▲0.2940.88 ▲0.05
Dashboard /wp-admin2,210 ▲365.55 ▼0.0283.94 ▼9.9970.59 ▲31.65
Posts /wp-admin/edit.php2,121 ▲212.00 ▼0.1139.03 ▼1.3933.58 ▼0.71
Add New Post /wp-admin/post-new.php1,555 ▲2723.11 ▼0.00673.78 ▲3.6667.47 ▲9.92
Media Library /wp-admin/upload.php1,418 ▲184.15 ▼0.04106.36 ▼10.1076.02 ▲25.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/phonegap-connect/plugin.php+29
    Undefined variable: valores_default
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Option page)
The official readme.txt might help

phonegap-connect/plugin.php 85% from 13 tests

The principal PHP file in "Phonegap Connect - Plugin Connection for your Wordpress Site from App" v. 3.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("phonegap-connect.php" instead of "plugin.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 plugin441 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34334441

PHP code Passed 2 tests

An short overview of 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.22
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png16.14KB1.24KB▼ 92.33%