78% arixess-trustedpmdealers

Code Review | TrustedPMDealers

WordPress plugin TrustedPMDealers scored78%from 54 tests.

About plugin

  • Plugin page: arixess-trustedpm...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: Dec 1, 2017
  • Number of updates: 15
  • Update frequency: every 5.7 days
  • Top authors: arixess (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.20ms] Passed 4 tests

A check of server-side resources used by TrustedPMDealers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.76 ▼3.54
Dashboard /wp-admin3.31 ▲0.0046.72 ▼6.01
Posts /wp-admin/edit.php3.36 ▲0.0045.79 ▼2.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.16 ▼20.50
Media Library /wp-admin/upload.php3.23 ▲0.0035.31 ▼2.43

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TrustedPMDealers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.191.59 ▼0.0940.27 ▼5.86
Dashboard /wp-admin2,203 ▲125.77 ▲0.9198.75 ▼1.3639.29 ▼4.85
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0335.01 ▼1.7933.51 ▼0.81
Add New Post /wp-admin/post-new.php1,519 ▼2323.17 ▲5.00644.66 ▼14.9159.30 ▲4.21
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0195.45 ▼21.7945.23 ▼2.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/arixess-trustedpmdealers/includes/views/product_column/success.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TrustedPMDealers\\Abstract_Dao' not found in wp-content/plugins/arixess-trustedpmdealers/includes/dao/db/wpdb_impl/class-product-db-dao.php:5
    • > PHP Notice
      Undefined variable: filed_name in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/ui/ui-select.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/product-tab-general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_column/not-loaded.php:1
    • > PHP Notice
      Undefined variable: required in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/ui/ui-select.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/product-tab.php:3
    • > PHP Notice
      Undefined variable: filed_name in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/ui/ui-input.php on line 1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/product-tab-inventory.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arixess-trustedpmdealers/includes/views/notification/error.php:2
    • > PHP Notice
      Undefined variable: required in wp-content/plugins/arixess-trustedpmdealers/includes/views/product_tab/ui/ui-input.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: api, precious metals, advertising

arixess-trustedpmdealers/TrustedPMDealers.php 77% from 13 tests

The main PHP script in "TrustedPMDealers" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("arixess-trustedpmdealers.php" instead of "TrustedPMDealers.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,772 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75305392,027
PHP413331171,962
CSS58427783

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.17
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces8
Traits0
Classes22
▷ Abstract classes29.09%
▷ Concrete classes2090.91%
▷ Final classes00.00%
Methods189
▷ Static methods94.76%
▷ Public methods16084.66%
▷ Protected methods10.53%
▷ Private methods2814.81%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants1066.67%
▷ Class constants533.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/chosen-sprite.png0.63KB0.88KB0.00%
assets/images/chosen-sprite.png0.63KB0.88KB0.00%
assets/images/checktree_icon.png1.10KB1.02KB▼ 7.12%
assets/images/logo.png18.99KB3.37KB▼ 82.27%