78% smm-api

Code Review | SMM API

WordPress plugin SMM API scored78%from 54 tests.

About plugin

  • Plugin page: smm-api
  • Plugin version: 6.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Oct 17, 2023
  • Number of updates: 333
  • Update frequency: every 8.8 days
  • Top authors: softnwords (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active /15,431 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.94ms] Passed 4 tests

A check of server-side resources used by SMM API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.08 ▼2.03
Dashboard /wp-admin3.35 ▼0.0043.83 ▼22.25
Posts /wp-admin/edit.php3.40 ▲0.0447.28 ▲1.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.93 ▼13.33
Media Library /wp-admin/upload.php3.27 ▲0.0436.62 ▲3.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 214 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
smm_recently_activated

Browser metrics Passed 4 tests

A check of browser resources used by SMM API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.40 ▲0.031.89 ▲0.0936.80 ▼6.97
Dashboard /wp-admin2,204 ▲355.58 ▼0.2789.54 ▼11.0141.39 ▲2.82
Posts /wp-admin/edit.php2,110 ▲132.02 ▼0.0039.17 ▼0.7737.11 ▼0.32
Add New Post /wp-admin/post-new.php1,541 ▲418.46 ▲0.37616.30 ▲9.1272.48 ▲1.10
Media Library /wp-admin/upload.php1,406 ▲64.18 ▲0.0393.99 ▲2.1941.86 ▲0.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • smm_recently_activated
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smm-api/plugin-fw/lib/smm-cpt-unlimited.php
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SMMS_SMAPI_INIT - assumed 'SMMS_SMAPI_INIT' (this will throw an Error in a future version of PHP) in wp-content/plugins/smm-api/plugin-options/subscriptions-options.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/smm-api/plugin-fw/templates/panel/woocommerce/woocommerce-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smm-api/plugin-fw/lib/promo/smms-promo.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smm-api/plugin-fw/templates/upgrade/changelog.php:20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smm-api/templates/admin/premium.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smm-api/plugin-options/privacy-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smm-api/plugin-fw/templates/upgrade/error.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/smm-api/plugin-fw/templates/panel/woocommerce/woocommerce-option-row.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smm-api/plugin-options/subscriptions-options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smm-api/plugin-fw/templates/sysinfo/system-information-panel.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: api panel, smm panel, reseller panel, social panel

smm-api/init.php 77% from 13 tests

The entry point to "SMM API" version 6.0.9 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.9.9" instead of "3.7.1")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smm-api.php" instead of "init.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
No dangerous file extensions were detected34,967 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP1184,0136,28516,948
JavaScript383,1697,92111,574
CSS138882265,156
PO File25349771,183
XML11261
SVG30145

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity43.23
▷ Minimum class complexity1.00
▷ Maximum class complexity202.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods496
▷ Static methods5811.69%
▷ Public methods45792.14%
▷ Protected methods214.23%
▷ Private methods183.63%
Functions143
▷ Named functions14299.30%
▷ Anonymous functions10.70%
Constants20
▷ Global constants20100.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
25 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc_disabled.png0.14KB0.25KB0.00%
plugin-fw/assets/images/spinner.png0.15KB0.14KB▼ 5.88%
assets/images/upgrade.png1.65KB1.17KB▼ 28.95%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%