84% popcashnet-code-integration-tool

Code Review | PopCash Code Integration Tool

WordPress plugin PopCash Code Integration Tool scored84%from 54 tests.

About plugin

  • Plugin page: popcashnet-code-i...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Jul 4, 2016
  • Latest release: Nov 8, 2023
  • Number of updates: 37
  • Update frequency: every 72.5 days
  • Top authors: popcashnet (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /34,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.49ms] Passed 4 tests

Server-side resources used by PopCash Code Integration Tool
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.42 ▲2.96
Dashboard /wp-admin3.36 ▲0.0645.91 ▲1.34
Posts /wp-admin/edit.php3.42 ▲0.0543.26 ▼3.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0593.76 ▲11.52
Media Library /wp-admin/upload.php3.29 ▲0.0535.59 ▲4.82

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
popcash_net_uid
db_upgraded
widget_theysaidso_widget
popcash_net_integration
popcash_net_wid
popcash_net_fallback
widget_recent-comments
popcash_net_disabled
popcash_net_api_key
...

Browser metrics Passed 4 tests

An overview of browser requirements for PopCash Code Integration Tool
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7314.14 ▼0.171.79 ▼0.0739.78 ▲1.60
Dashboard /wp-admin2,243 ▲625.59 ▼0.1287.68 ▼12.5238.06 ▼3.81
Posts /wp-admin/edit.php2,148 ▲482.02 ▲0.0135.87 ▼4.8333.54 ▼2.53
Add New Post /wp-admin/post-new.php1,539 ▲1323.19 ▼0.29604.85 ▼53.7048.24 ▼9.38
Media Library /wp-admin/upload.php1,446 ▲434.24 ▲0.1095.80 ▼1.9442.24 ▼0.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checkIntegration() in wp-content/plugins/popcashnet-code-integration-tool/forms/standard_form.php:5
    • > PHP Notice
      Trying to get property 'apiKey' of non-object in wp-content/plugins/popcashnet-code-integration-tool/PopcashAab.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pcit_popcash_switch_enabled() in wp-content/plugins/popcashnet-code-integration-tool/template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pcit_popcash_switch_enabled() in wp-content/plugins/popcashnet-code-integration-tool/template/index.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/popcashnet-code-integration-tool/ids_form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checkIntegration() in wp-content/plugins/popcashnet-code-integration-tool/forms/aab_form.php:5
    • > PHP Notice
      Trying to get property 'wid' of non-object in wp-content/plugins/popcashnet-code-integration-tool/PopcashAab.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/popcashnet-code-integration-tool/PopcashAab.php:180
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcashnet-code-integration-tool/textarea_form.php:5
    • > PHP Notice
      Trying to get property 'fcap' of non-object in wp-content/plugins/popcashnet-code-integration-tool/PopcashAab.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: tool, popunder, script, snippet, integration...

popcashnet-code-integration-tool/main.php 92% from 13 tests

"PopCash Code Integration Tool" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("popcashnet-code-integration-tool.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected932 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1116181586
JavaScript44617193
CSS5416153

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png40.48KB14.72KB▼ 63.63%