73% mamurjor-invoice

Code Review | Mamurjor Invoice

WordPress plugin Mamurjor Invoice scored73%from 54 tests.

About plugin

  • Plugin page: mamurjor-invoice
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.0
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: May 21, 2020
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: mamurjor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /376 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▲1.90ms] Passed 4 tests

Server-side resources used by Mamurjor Invoice
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1143.14 ▼2.25
Dashboard /wp-admin3.42 ▲0.1254.72 ▲2.35
Posts /wp-admin/edit.php3.54 ▲0.1852.79 ▲4.56
Add New Post /wp-admin/post-new.php6.02 ▲0.1498.91 ▲3.87
Media Library /wp-admin/upload.php3.35 ▲0.1241.85 ▲3.64
Invoice Setting /wp-admin/admin.php?page=invoice_setting3.3136.80
invoice /wp-admin/admin.php?page=invoice3.3137.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_mamurjor_invoice
wp_mamurjor_invoice_details
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mamurjor Invoice
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲29113.80 ▼0.498.12 ▲6.2429.45 ▼17.18
Dashboard /wp-admin2,342 ▲1715.99 ▲0.39101.66 ▼1.6448.68 ▲6.00
Posts /wp-admin/edit.php2,247 ▲1472.20 ▲0.1736.67 ▼1.6540.28 ▲4.30
Add New Post /wp-admin/post-new.php1,658 ▲11823.40 ▲0.58524.42 ▼155.1030.37 ▼28.70
Media Library /wp-admin/upload.php1,547 ▲1504.61 ▲0.3699.76 ▼11.5549.04 ▲4.55
Invoice Setting /wp-admin/admin.php?page=invoice_setting9942.2626.5036.28
invoice /wp-admin/admin.php?page=invoice1,1512.2728.2836.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_mamurjor_invoice
    • wp_mamurjor_invoice_details
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mamurjor-invoice/admin/partials/mamurjor_invoice-admin-display.php
    • > /wp-content/plugins/mamurjor-invoice/public/partials/mamurjor_invoice-public-display.php
    • > /wp-content/plugins/mamurjor-invoice/admin/admin.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
The official readme.txt might help

mamurjor-invoice/mamurjor_invoice.php 85% from 13 tests

The primary PHP file in "Mamurjor Invoice" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mamurjor-invoice.php" instead of "mamurjor_invoice.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
There were no executable files found in this plugin866 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13285554704
JavaScript35297145
CSS31817

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin