73% cashineh-web-service

Code Review | Cashineh Webservice

WordPress plugin Cashineh Webservicescored73%from 54 tests.

About plugin

  • Plugin page: cashineh-web-service
  • Plugin version: 1.0.0.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Aug 29, 2018
  • Number of updates: 18
  • Update frequency: every 1.0 days
  • Top authors: cashineh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /651 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.65ms] Passed 4 tests

A check of server-side resources used by Cashineh Webservice
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0240.02 ▼3.90
Dashboard /wp-admin3.40 ▲0.0248.54 ▼13.96
Posts /wp-admin/edit.php3.52 ▲0.1248.76 ▼13.52
Add New Post /wp-admin/post-new.php5.98 ▲0.0688.55 ▼11.23
Media Library /wp-admin/upload.php3.33 ▲0.0638.73 ▼1.08
مدیریت کشینه /wp-admin/admin.php?page=cash_set_url3.2933.38
صفحه اصلی /wp-admin/admin.php?page=cash_main3.2934.32

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: 1 new table, 8 new options
New tables
wp_cash_order
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
cash_token_value
widget_recent-comments
db_upgraded
cash_utm_value

Browser metrics Passed 4 tests

An overview of browser requirements for Cashineh Webservice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5414.25 ▼0.101.81 ▼0.3344.92 ▲3.31
Dashboard /wp-admin2,221 ▲415.59 ▼0.0687.16 ▲0.6465.93 ▲25.32
Posts /wp-admin/edit.php2,129 ▲261.97 ▲0.0139.18 ▼7.4142.56 ▲4.30
Add New Post /wp-admin/post-new.php1,562 ▲3423.19 ▼0.06800.61 ▲98.4254.68 ▼2.49
Media Library /wp-admin/upload.php1,423 ▲234.15 ▼0.04108.51 ▲0.6586.03 ▲36.82
مدیریت کشینه /wp-admin/admin.php?page=cash_set_url8681.6625.7650.73
صفحه اصلی /wp-admin/admin.php?page=cash_main7971.6726.7039.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_cash_order
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • cash_utm_value
    • db_upgraded
    • cash_token_value
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cashineh-web-service/inc/frontend.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cashineh-web-service/inc/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cashineh-web-service/inc/backend.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === Cashineh Webservice=== )
  • Screenshots: Add an image for screenshot #1 (Settings page)
The official readme.txt is a good inspiration

cashineh-web-service/wpcashineh.php 92% from 13 tests

The main file in "Cashineh Webservice" v. 1.0.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cashineh-web-service.php" instead of "wpcashineh.php")

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
No dangerous file extensions were detected335 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP65538269
JavaScript18044
CSS11022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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 complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.10KB15.06KB▼ 60.47%