94% speakup-email-petitions-importer

Code Review | SpeakUp! Email Petitions Importer

WordPress plugin SpeakUp! Email Petitions Importer scored 94% from 54 tests.

About plugin

  • Plugin page: speakup-email-pet...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 5.8.1
  • First release: Sep 30, 2013
  • Latest release: Oct 27, 2014
  • Number of updates: 7
  • Update frequency: every 56.2 days
  • Top authors: bastho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,414 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼141.72ms] Passed 4 tests

This is a short check of server-side resources used by SpeakUp! Email Petitions Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0035.54 ▲2.46
Dashboard /wp-admin3.06 ▲0.0050.01 ▲2.02
Posts /wp-admin/edit.php3.11 ▲0.0046.75 ▼3.34
Add New Post /wp-admin/post-new.php5.42 ▼0.0292.49 ▼561.60
Media Library /wp-admin/upload.php3.00 ▲0.0031.29 ▼3.95

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SpeakUp! Email Petitions Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4215.91 ▲0.4411.14 ▲1.7950.09 ▲2.72
Dashboard /wp-admin2,970 ▲365.90 ▼0.33148.38 ▼1.13110.55 ▼8.06
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0165.30 ▼2.1388.57 ▲5.11
Add New Post /wp-admin/post-new.php1,615 ▼2,01921.49 ▲6.51284.36 ▼222.86103.14 ▼4.22
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.01160.04 ▲0.94116.96 ▲6.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/speakup-email-petitions-importer/speakup-email-importer.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/speakup-email-petitions-importer/form.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Import-form) image not found
Please take inspiration from this readme.txt

speakup-email-petitions-importer/speakup-email-importer.php 92% from 13 tests

The primary PHP file in "SpeakUp! Email Petitions Importer" version 1.3.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("speakup-email-petitions-importer.php" instead of "speakup-email-importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin261 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31426195
PO File1151547
JavaScript17019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity6.57
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected