83% domyaccounting

Code Review | DoMyAccounting

WordPress plugin DoMyAccounting scored83%from 54 tests.

About plugin

  • Plugin page: domyaccounting
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 7, 2019
  • Latest release: Nov 26, 2019
  • Number of updates: 6
  • Update frequency: every 5.5 days
  • Top authors: redefiningtheweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▲0.07ms] Passed 4 tests

Analyzing server-side resources used by DoMyAccounting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2246.30 ▲5.38
Dashboard /wp-admin3.51 ▲0.2054.50 ▲9.32
Posts /wp-admin/edit.php3.62 ▲0.2648.29 ▼0.74
Add New Post /wp-admin/post-new.php6.11 ▲0.2286.11 ▼13.69
Media Library /wp-admin/upload.php3.43 ▲0.2049.49 ▲15.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by DoMyAccounting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.81 ▲0.231.76 ▲0.0944.05 ▼1.13
Dashboard /wp-admin2,221 ▲365.83 ▼0.02109.90 ▲12.5072.35 ▲28.96
Posts /wp-admin/edit.php2,101 ▲122.01 ▼0.0535.89 ▼0.6732.10 ▲0.72
Add New Post /wp-admin/post-new.php1,682 ▲14922.26 ▼1.06766.32 ▲160.7554.26 ▲2.48
Media Library /wp-admin/upload.php1,400 ▲94.21 ▼0.0098.55 ▲1.7474.28 ▲31.24

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
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/domyaccounting/templates/admin/rtwdma-advance.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/domyaccounting/templates/admin/rtwdma-help.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/domyaccounting/templates/admin/rtwdma-automation.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/domyaccounting/templates/admin/rtwdma-one-click-sync.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/domyaccounting/templates/admin/rtwdma-basic.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/domyaccounting/admin/partials/rtwdma-domyaccounting-admin-display.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/domyaccounting/admin/partials/rtwdma-license-verification.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

domyaccounting/domyaccounting.php 85% from 13 tests

"DoMyAccounting" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,495 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP152537021,540
CSS138588
JavaScript1250367

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.20
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods4790.38%
▷ Protected methods00.00%
▷ Private methods59.62%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/support.png9.10KB4.14KB▼ 54.56%
admin/images/document.png9.51KB4.39KB▼ 53.87%
admin/images/faq.png9.66KB4.48KB▼ 53.62%
admin/images/icon.png3.98KB0.59KB▼ 85.04%
admin/images/skype.png12.59KB4.74KB▼ 62.39%