73% apa-register-newsletter-form

Code Review | APA Register Newsletter Form

WordPress plugin APA Register Newsletter Form scored73%from 54 tests.

About plugin

  • Plugin page: apa-register-news...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Aug 20, 2016
  • Number of updates: 17
  • Update frequency: every 1.1 days
  • Top authors: aatmaadhikari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,062 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.78ms] Passed 4 tests

An overview of server-side resources used by APA Register Newsletter Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.63 ▼34.08
Dashboard /wp-admin2.08 ▼1.235.15 ▼48.36
Posts /wp-admin/edit.php2.08 ▼1.285.78 ▼44.49
Add New Post /wp-admin/post-new.php2.08 ▼3.815.82 ▼92.17
Media Library /wp-admin/upload.php2.08 ▼1.155.87 ▼27.78
Documentation /wp-admin/admin.php?page=aparnf_admin_documentation2.086.38
Res Summary /wp-admin/admin.php?page=aparnf_admin_list_data2.086.39
Reg List /wp-admin/admin.php?page=apa-register-newsletter-form/newletter.php2.085.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: 1 new table, 6 new options
New tables
wp_reg_form
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

APA Register Newsletter Form: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.17 ▼0.181.54 ▼0.1528.46 ▼17.30
Dashboard /wp-admin2,230 ▲535.52 ▼0.1383.30 ▼14.0268.96 ▲23.64
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0439.37 ▲0.0740.49 ▲4.80
Add New Post /wp-admin/post-new.php1,716 ▲18824.39 ▲1.46691.84 ▲23.5056.21 ▼8.45
Media Library /wp-admin/upload.php1,432 ▲324.23 ▲0.0696.05 ▼2.0482.83 ▲35.30
Documentation /wp-admin/admin.php?page=aparnf_admin_documentation8081.9622.7424.35
Res Summary /wp-admin/admin.php?page=aparnf_admin_list_data8432.0030.2030.81
Reg List /wp-admin/admin.php?page=apa-register-newsletter-form/newletter.php8552.0025.2427.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the apaorder handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apa-register-newsletter-form/newletter.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the apaorder handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apa-register-newsletter-form/newletter.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apa-register-newsletter-form/newletter.php
    • > Notice in wp-content/plugins/apa-register-newsletter-form/reg_list.php+13
    Undefined index: pageid
    • > GET request to /wp-admin/admin.php?page=aparnf_admin_list_data
    • > Notice in wp-content/plugins/apa-register-newsletter-form/reg_summary.php+84
    Undefined variable: pagination

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === apa-register-newsletter-form === )
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
  • Tags: You are using too many tags: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

apa-register-newsletter-form/newletter.php 85% from 13 tests

The primary PHP file in "APA Register Newsletter Form" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("apa-register-newsletter-form.php" instead of "newletter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected519 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP710750438
CSS115481

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
28 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png61.24KB26.71KB▼ 56.38%
images/banner_big.png2.07KB1.38KB▼ 33.60%
images/add_small.png3.10KB0.46KB▼ 85.12%
images/edit.png1.52KB1.38KB▼ 9.45%
images/hot_listing.png0.73KB0.84KB0.00%