10% wp-tactical-popup

Code Review | WP Tactical Popup

WordPress plugin WP Tactical Popup scored10%from 54 tests.

About plugin

  • Plugin page: wp-tactical-popup
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Jun 3, 2016
  • Number of updates: 17
  • Update frequency: every 38.5 days
  • Top authors: Arevico (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /6,813 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php+91
    Declaration of wppt_popup_table::prepare_items($model) should be compatible with WP_List_Table::prepare_items()

Server metrics [RAM: ▼1.91MB] [CPU: ▼60.49ms] Passed 4 tests

Analyzing server-side resources used by WP Tactical Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.87 ▼8.71
Dashboard /wp-admin2.05 ▼1.305.46 ▼58.86
Posts /wp-admin/edit.php2.05 ▼1.315.72 ▼49.40
Add New Post /wp-admin/post-new.php2.05 ▼3.845.25 ▼103.48
Media Library /wp-admin/upload.php2.05 ▼1.185.58 ▼30.21
WP Tactical Popup /wp-admin/admin.php?page=wppt-tld2.055.74
Add HTML Popup /wp-admin/admin.php?page=wppt-add-html2.056.24
Add Image Popup /wp-admin/admin.php?page=wppt-add-image2.055.88
Add Popup /wp-admin/admin.php?page=wppt-add-popup2.056.79
Add Email Popup /wp-admin/admin.php?page=wppt-add-email2.054.75
Global Settings /wp-admin/admin.php?page=wppt-global2.055.59

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 39 new files
Database: 2 new tables, 7 new options
New tables
wp__wpptDisplay_Rules
wp__wpptPopups
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
wppt-global-options

Browser metrics Passed 4 tests

WP Tactical Popup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.29 ▼0.073.33 ▲1.5940.87 ▼4.33
Dashboard /wp-admin2,226 ▲465.63 ▲0.0291.73 ▼5.3136.52 ▼8.76
Posts /wp-admin/edit.php2,134 ▲341.96 ▼0.1439.35 ▼1.7836.05 ▼4.11
Add New Post /wp-admin/post-new.php1,551 ▲2523.05 ▼0.40609.55 ▼61.2954.91 ▼2.97
Media Library /wp-admin/upload.php1,425 ▲284.23 ▼0.01103.65 ▲4.3146.35 ▲4.31
WP Tactical Popup /wp-admin/admin.php?page=wppt-tld1,2763.0144.7233.40
Add HTML Popup /wp-admin/admin.php?page=wppt-add-html1,2003.0239.4343.73
Add Image Popup /wp-admin/admin.php?page=wppt-add-image1,2233.1739.9531.94
Add Popup /wp-admin/admin.php?page=wppt-add-popup1,0223.1137.9960.65
Add Email Popup /wp-admin/admin.php?page=wppt-add-email1,2983.0837.7126.29
Global Settings /wp-admin/admin.php?page=wppt-global1,0463.1137.5831.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php+91
    Declaration of wppt_popup_table::prepare_items($model) should be compatible with WP_List_Table::prepare_items()
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp__wpptDisplay_Rules
    • wp__wpptPopups
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wppt-global-options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wppt-global
    • > Warning in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php+91
    Declaration of wppt_popup_table::prepare_items($model) should be compatible with WP_List_Table::prepare_items()

SRP 50% 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
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'wpptAdminViewSimple' not found in wp-content/plugins/wp-tactical-popup/views/class-admin-global-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'wpptModel' not found in wp-content/plugins/wp-tactical-popup/models/class-popup-model.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'wpptAdminView' not found in wp-content/plugins/wp-tactical-popup/includes/class-admin-view-db.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-tactical-popup/index.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'wpptAdminView' not found in wp-content/plugins/wp-tactical-popup/includes/class-admin-view-simple.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'wpptAdminViewSimple' not found in wp-content/plugins/wp-tactical-popup/views/class-add-popup.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-tactical-popup/views/class-table-popups.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

wp-tactical-popup/index.php 85% from 13 tests

The main file in "WP Tactical Popup" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 229 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-tactical-popup.php" instead of "index.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
Good job! No executable or dangerous file extensions detected5,544 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript56702532,855
PHP217502331,984
CSS313550705

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.95
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes419.05%
▷ Concrete classes1780.95%
▷ Final classes00.00%
Methods147
▷ Static methods3523.81%
▷ Public methods13189.12%
▷ Protected methods21.36%
▷ Private methods149.52%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/modal/close.png1.48KB1.73KB0.00%
includes/admin-style/img-html.png3.83KB0.68KB▼ 82.17%
includes/jscolor/hs.png2.62KB7.54KB0.00%
includes/admin-style/img-mail.png6.47KB2.21KB▼ 65.82%
includes/jscolor/hv.png2.80KB7.32KB0.00%