62% wp2act

Code Review | WP2Act

WordPress plugin WP2Act scored62%from 54 tests.

About plugin

  • Plugin page: wp2act
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 30, 2017
  • Latest release: Dec 21, 2017
  • Number of updates: 16
  • Update frequency: every 3.5 days
  • Top authors: crmaddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.58MB] [CPU: ▼60.08ms] Passed 4 tests

An overview of server-side resources used by WP2Act
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.42 ▼1.045.91 ▼38.00
Dashboard /wp-admin2.44 ▼0.907.42 ▼56.97
Posts /wp-admin/edit.php2.44 ▼0.917.78 ▼44.81
Add New Post /wp-admin/post-new.php2.44 ▼3.447.19 ▼100.55
Media Library /wp-admin/upload.php2.44 ▼0.797.18 ▼29.99
Show Pages /wp-admin/admin.php?page=show_page_menu2.447.39
WP2Act Setting /wp-admin/admin.php?page=wp2act_setting2.448.05
Link Title /wp-admin/admin.php?page=link_title_menu2.446.72

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

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

Browser metrics Passed 4 tests

WP2Act: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲16714.13 ▼0.227.71 ▲5.7743.25 ▲0.16
Dashboard /wp-admin2,254 ▲695.17 ▼0.71101.64 ▼11.2784.70 ▲32.26
Posts /wp-admin/edit.php2,131 ▲392.26 ▲0.1142.64 ▲1.0237.59 ▲1.39
Add New Post /wp-admin/post-new.php1,551 ▲1717.46 ▼5.68756.05 ▲105.7539.23 ▼22.06
Media Library /wp-admin/upload.php1,431 ▲434.58 ▲0.3799.09 ▼7.0680.14 ▲36.24
Show Pages /wp-admin/admin.php?page=show_page_menu8761.9124.9531.98
WP2Act Setting /wp-admin/admin.php?page=wp2act_setting8901.8126.6727.36
Link Title /wp-admin/admin.php?page=link_title_menu8311.9327.6726.15

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 bootstrap-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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=link_title_menu
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 bootstrap-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=link_title_menu
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 crm_manager handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=link_title_menu
    • > Notice in wp-content/plugins/wp2act/CRMAddon-Teaser.php+651
    Trying to access array offset on value of type bool

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp2act/CRMAddon-Teaser.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp2act/frontend-form.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: crmaddon-contact, wp2act, act, contact-information

wp2act/CRMAddon-Teaser.php 85% from 13 tests

Analyzing the main PHP file in "WP2Act" version 1.3
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("wp2act.php" instead of "CRMAddon-Teaser.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,005 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP21511421,067
CSS2546296
SVG100288
PO File3108114270
JavaScript218884

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.39
Average class complexity173.00
▷ Minimum class complexity173.00
▷ Maximum class complexity173.00
Average method complexity6.21
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2678.79%
▷ Protected methods00.00%
▷ Private methods721.21%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/contact_data.png5.95KB2.30KB▼ 61.30%
images/icon.png1.44KB0.71KB▼ 51.12%