78% saf-moss

Code Review | SAF MOSS

WordPress plugin SAF MOSS scored78%from 54 tests.

About plugin

  • Plugin page: saf-moss
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.9
  • WordPress version: 6.3.1
  • First release: Feb 28, 2015
  • Latest release: Nov 9, 2017
  • Number of updates: 21
  • Update frequency: every 47.1 days
  • Top authors: bseddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /891 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.83MB] [CPU: ▼1.46ms] Passed 4 tests

An overview of server-side resources used by SAF MOSS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.42 ▲0.66
Dashboard /wp-admin4.33 ▲1.0358.80 ▲5.53
Posts /wp-admin/edit.php4.38 ▲1.0355.04 ▼0.00
Add New Post /wp-admin/post-new.php6.94 ▲1.0588.19 ▼12.03
Media Library /wp-admin/upload.php4.25 ▲1.0247.50 ▲10.66
Settings /wp-admin/admin.php?page=moss-saf-settings4.1336.44
Definitions /wp-admin/admin.php?page=moss-saf-definitions4.2439.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
moss_saf_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for SAF MOSS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7613.35 ▼1.061.86 ▲0.1043.22 ▲4.25
Dashboard /wp-admin2,246 ▲665.97 ▲0.31100.28 ▲12.1744.89 ▲2.82
Posts /wp-admin/edit.php2,150 ▲472.43 ▲0.4236.65 ▼5.0234.91 ▼3.97
Add New Post /wp-admin/post-new.php1,569 ▲4323.06 ▼0.64671.64 ▲54.8837.03 ▼20.18
Media Library /wp-admin/upload.php1,451 ▲484.48 ▲0.3398.25 ▼2.3241.15 ▼1.76
Settings /wp-admin/admin.php?page=moss-saf-settings1,2222.2134.3436.46
Definitions /wp-admin/admin.php?page=moss-saf-definitions1,4052.1229.9827.30

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • moss_saf_settings
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=moss-saf-settings
    • > Warning in wp-content/plugins/saf-moss/includes/admin-notices.php+51
    Use of undefined constant VAT_MOSS_ACTIVATION_ERROR_NOTICE - assumed 'VAT_MOSS_ACTIVATION_ERROR_NOTICE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=moss-saf-settings
    • > Warning in wp-content/plugins/saf-moss/includes/admin-notices.php+51
    Use of undefined constant VAT_MOSS_ACTIVATION_UPDATE_NOTICE - assumed 'VAT_MOSS_ACTIVATION_UPDATE_NOTICE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=moss-saf-settings
    • > Warning in wp-content/plugins/saf-moss/includes/admin-notices.php+51
    Use of undefined constant VAT_MOSS_DEACTIVATION_ERROR_NOTICE - assumed 'VAT_MOSS_DEACTIVATION_ERROR_NOTICE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=moss-saf-settings
    • > Warning in wp-content/plugins/saf-moss/includes/admin-notices.php+51
    Use of undefined constant VAT_MOSS_DEACTIVATION_UPDATE_NOTICE - assumed 'VAT_MOSS_DEACTIVATION_UPDATE_NOTICE' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=moss-saf-settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lyquidity\\vat_moss_saf\\get_default_currency() in wp-content/plugins/saf-moss/test.php:17
    • >

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (31 tag instead of maximum 10)
You can look at the official readme.txt

saf-moss/saf-moss.php 92% from 13 tests

The main file in "SAF MOSS" v. 1.0.13 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin4,642 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,1301,7954,316
JavaScript32943210
CSS1225116

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity32.00
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods95
▷ Static methods44.21%
▷ Public methods9498.95%
▷ Protected methods11.05%
▷ Private methods00.00%
Functions90
▷ Named functions8291.11%
▷ Anonymous functions88.89%
Constants21
▷ Global constants21100.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
No PNG files were detected