79% xamoom

Code Review | xamoom

WordPress plugin xamoom scored79%from 54 tests.

About plugin

  • Plugin page: xamoom
  • Plugin version: 3.6.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2019
  • Latest release: Oct 29, 2020
  • Number of updates: 28
  • Update frequency: every 20.3 days
  • Top authors: xamoom1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼1.44ms] Passed 4 tests

A check of server-side resources used by xamoom
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2450.18 ▲4.98
Dashboard /wp-admin3.53 ▲0.2353.88 ▲2.31
Posts /wp-admin/edit.php3.65 ▲0.2955.54 ▼1.53
Add New Post /wp-admin/post-new.php6.13 ▲0.2497.97 ▼11.06
Media Library /wp-admin/upload.php3.46 ▲0.2441.51 ▲4.51
xamoom /wp-admin/options-general.php?page=xamoom-settings3.4240.72

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

xamoom: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲23918.46 ▲4.0656.56 ▲54.9138.34 ▼3.30
Dashboard /wp-admin2,257 ▲806.36 ▲0.83125.61 ▲26.8542.44 ▲4.70
Posts /wp-admin/edit.php2,164 ▲643.20 ▲1.1754.86 ▲14.0637.32 ▼0.82
Add New Post /wp-admin/post-new.php6,209 ▲4,68319.08 ▼4.63931.89 ▲208.3338.97 ▼19.22
Media Library /wp-admin/upload.php1,468 ▲685.65 ▲1.48106.56 ▼7.0843.29 ▼2.49
xamoom /wp-admin/options-general.php?page=xamoom-settings9032.8643.4229.89

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xamoom/tiny-mce-plugin/xamoom-tiny-mce.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/xamoom/includes/class-xamoom.php:267

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=xamoom-settings
    • > Network (severe)
    https://api.xamoom.net/consumer/contents/null - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/options-general.php?page=xamoom-settings
    • > Network (severe)
    https://api.xamoom.net/consumer/contents?page%5Bsize%5D=1 - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/options-general.php?page=xamoom-settings
    • > Network (severe)
    https://api.xamoom.net/consumer/contents?page%5Bsize%5D=10&filter%5Bname%5D=&{%22page[size]%22:%2210%22} - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/options-general.php?page=xamoom-settings
    • > Console-api (severe) in unknown
    /wp-content/plugins/xamoom/block/js/block.js?ver=3.6.0 172:22 "Something went wrong." Object

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: location based service, nfc, qr, ibeacon, cms...

xamoom/xamoom.php Passed 13 tests

The principal PHP file in "xamoom" v. 3.6.0 is loaded by WordPress automatically on each request
56 characters long description:
This plugin allows you to sync xamoom pages to Wordpress

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 detected12,966 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
SVG501210,011
PHP122526911,035
CSS8132881,012
JavaScript9126136839
PO File1101059
Markdown14010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods3984.78%
▷ Protected methods00.00%
▷ Private methods715.22%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%
public/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
public/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%
public/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
public/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%