89% campt-instamojo-payment-gateway

Code Review | CampTix Instamojo Payment Gateway

WordPress plugin CampTix Instamojo Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: campt-instamojo-p...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Jul 7, 2017
  • Latest release: Jul 20, 2017
  • Number of updates: 13
  • Update frequency: every 1.0 days
  • Top authors: codexdemon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,571 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.90ms] Passed 4 tests

An overview of server-side resources used by CampTix Instamojo Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.86 ▼5.91
Dashboard /wp-admin3.31 ▼0.0449.37 ▼7.77
Posts /wp-admin/edit.php3.36 ▲0.0046.18 ▼5.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.82 ▼16.86
Media Library /wp-admin/upload.php3.23 ▲0.0032.56 ▼2.70

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

CampTix Instamojo Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.584.18 ▲2.3940.18 ▲0.45
Dashboard /wp-admin2,206 ▲214.83 ▼1.02110.77 ▲11.0740.28 ▼2.88
Posts /wp-admin/edit.php2,092 ▼02.00 ▲0.0440.42 ▼1.3832.56 ▼3.50
Add New Post /wp-admin/post-new.php1,519 ▼923.73 ▲0.66603.45 ▼79.2951.13 ▲3.81
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0295.07 ▼1.5441.71 ▼2.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Instamojo Enable), #2 (Instamojo Activation), #3 (Get Mobile Number Field), #4 (Activate INR)
The official readme.txt might help

campt-instamojo-payment-gateway/camptix-instamojo.php 92% from 13 tests

The entry point to "CampTix Instamojo Payment Gateway" version 1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("campt-instamojo-payment-gateway.php" instead of "camptix-instamojo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected404 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210947293
JavaScript14478111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png117.38KB33.26KB▼ 71.67%