79% galleries-markers

Code Review | Galleries Markers

WordPress plugin Galleries Markers scored79%from 54 tests.

About plugin

  • Plugin page: galleries-markers
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2020
  • Latest release: Oct 21, 2020
  • Number of updates: 10
  • Update frequency: every 0.5 days
  • Top authors: miniplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.16ms] Passed 4 tests

Analyzing server-side resources used by Galleries Markers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.37 ▲0.37
Dashboard /wp-admin3.47 ▲0.1347.19 ▼12.05
Posts /wp-admin/edit.php3.58 ▲0.2350.10 ▲1.96
Add New Post /wp-admin/post-new.php6.07 ▲0.1994.65 ▲1.10
Media Library /wp-admin/upload.php3.39 ▲0.1734.57 ▲2.01
Settings /wp-admin/edit.php?post_type=galleries-markers&page=gallery-markers-setting3.3733.29
All galleries /wp-admin/edit.php?post_type=galleries-markers3.4842.09
Add New /wp-admin/post-new.php?post_type=galleries-markers3.4845.89

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
galleries-markers-demo
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Galleries Markers: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.29 ▼1.011.78 ▲0.0543.12 ▲2.19
Dashboard /wp-admin2,260 ▲745.05 ▲0.10103.11 ▼12.6739.95 ▲0.50
Posts /wp-admin/edit.php2,153 ▲642.32 ▲0.3341.28 ▲3.9135.05 ▲0.05
Add New Post /wp-admin/post-new.php1,576 ▲4823.48 ▲0.16591.22 ▼101.9232.06 ▼20.21
Media Library /wp-admin/upload.php1,494 ▲1094.53 ▲0.33100.82 ▼11.1041.97 ▼6.88
Settings /wp-admin/edit.php?post_type=galleries-markers&page=gallery-markers-setting9251.9926.5727.08
All galleries /wp-admin/edit.php?post_type=galleries-markers1,6602.3134.8631.30
Add New /wp-admin/post-new.php?post_type=galleries-markers1,6684.1871.5532.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • galleries-markers-demo

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/galleries-markers/metabox/slides/tmpl/slides.tpl.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/galleries-markers/admin/setting.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/galleries-markers/metabox/slides/tmpl/slides.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/galleries-markers/templates/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Galleries_Markers_Meta_Box' not found in wp-content/plugins/galleries-markers/metabox/slides/slides.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=galleries-markers
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=galleries-markers - Access to XMLHttpRequest at 'javascript:;' from origin '' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https, chrome-untrusted.
    • > GET request to /wp-admin/post-new.php?post_type=galleries-markers
    • > Network (severe)
    javascript:; - Failed to load resource: net::ERR_FAILED

Optimizations

Plugin configuration Passed 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
9 plugin tags: nodes on image, gallery node, image node, slider node, images nodes...

galleries-markers/galleries-markers.php Passed 13 tests

"Galleries Markers" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
Galleries Markers - Create more Nodes on more images and display with slider.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,496 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP13132183945
JavaScript8114198588
CSS3633583
Sass2211360
SVG10019
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods4297.67%
▷ Protected methods00.00%
▷ Private methods12.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin