74% danamojo

Code Review | danamojo

WordPress plugin danamojo scored74%from 54 tests.

About plugin

  • Plugin page: danamojo
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2020
  • Latest release: Mar 6, 2023
  • Number of updates: 33
  • Update frequency: every 25.4 days
  • Top authors: danamojo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /988 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.19ms] Passed 4 tests

Server-side resources used by danamojo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1846.92 ▲5.11
Dashboard /wp-admin3.53 ▲0.2248.10 ▼9.24
Posts /wp-admin/edit.php3.63 ▲0.2748.77 ▼0.02
Add New Post /wp-admin/post-new.php6.22 ▲0.3375.24 ▼17.77
Media Library /wp-admin/upload.php3.47 ▲0.2434.82 ▼1.71
Add New /wp-admin/admin.php?page=dps_new3.3633.38
Settings /wp-admin/admin.php?page=dps_settings3.3736.61
ShortCodes /wp-admin/admin.php?page=dps3.3936.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 10 new options
New tables
wp_dps_ngos_list
New WordPress options
dps_integration_ngoid
dps_custom_css
plugin_permalinks_flushed
theysaidso_admin_options
widget_recent-posts
db_upgraded
dps_custom_js
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for danamojo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.22 ▼1.404.79 ▲2.9640.75 ▼4.11
Dashboard /wp-admin2,246 ▲615.82 ▼0.06100.17 ▼21.7542.92 ▼1.65
Posts /wp-admin/edit.php2,131 ▲422.02 ▲0.0339.20 ▼1.9136.15 ▼0.50
Add New Post /wp-admin/post-new.php1,565 ▲4623.29 ▲0.13666.85 ▲56.6258.54 ▲3.68
Media Library /wp-admin/upload.php1,428 ▲404.21 ▲0.02105.14 ▲1.4743.83 ▲1.28
Add New /wp-admin/admin.php?page=dps_new1,0892.0424.8845.56
Settings /wp-admin/admin.php?page=dps_settings8982.0526.8731.17
ShortCodes /wp-admin/admin.php?page=dps1,0391.7126.9927.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_dps_ngos_list
  • Zombie WordPress options detected upon uninstall: 10 options
    • theysaidso_admin_options
    • dps_integration_ngoid
    • dps_custom_js
    • widget_recent-posts
    • dps_custom_css
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • plugin_permalinks_flushed
    • widget_theysaidso_widget

Smoke tests 75% 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
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+465
    Undefined variable: results
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+465
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+390
    Trying to get property 'display_type' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+400
    Trying to get property 'show_button_image' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+432
    Trying to get property 'layout' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+450
    Trying to get property 'display_tab' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dps_new
    • > Notice in wp-content/plugins/danamojo/classes/class.danamojo-payment-settings.php+465
    Trying to get property 'display_qrcode' of non-object

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

danamojo/danamojo.php 92% from 13 tests

"danamojo" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin813 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2126108760
CSS17353

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity49.50
▷ Minimum class complexity14.00
▷ Maximum class complexity85.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods514.29%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin