84% cactus-masonry-plus

Code Review | Cactus Masonry Plus

WordPress plugin Cactus Masonry Plus scored84%from 54 tests.

About plugin

  • Plugin page: cactus-masonry-plus
  • Plugin version: 0.0.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.6
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: Sep 9, 2016
  • Number of updates: 20
  • Update frequency: every 6.8 days
  • Top authors: bortpress (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /4,217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.04ms] Passed 4 tests

An overview of server-side resources used by Cactus Masonry Plus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.20 ▲1.82
Dashboard /wp-admin3.39 ▲0.0843.84 ▼7.41
Posts /wp-admin/edit.php3.44 ▲0.0845.79 ▲1.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.58 ▼2.95
Media Library /wp-admin/upload.php3.31 ▲0.0835.50 ▲1.08
Cactus Masonry Plus /wp-admin/plugins.php?page=cactus_masonry_plus_intro3.2930.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Cactus Masonry Plus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.60 ▼0.768.54 ▲6.6539.31 ▼8.80
Dashboard /wp-admin2,213 ▲255.88 ▼0.0497.33 ▼11.1538.95 ▼0.11
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0740.40 ▲2.2636.62 ▲0.91
Add New Post /wp-admin/post-new.php1,517 ▼217.66 ▼5.62708.03 ▲50.7250.95 ▼1.19
Media Library /wp-admin/upload.php1,386 ▼54.22 ▼0.03100.14 ▲1.9843.59 ▼2.06
Cactus Masonry Plus /wp-admin/plugins.php?page=cactus_masonry_plus_intro9422.1725.1442.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cactus-masonry-plus/cactusMasonry.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === cactus-masonry-plus === )
You can look at the official readme.txt

cactus-masonry-plus/cactusMasonry.php 92% from 13 tests

"Cactus Masonry Plus" version 0.0.5.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cactus-masonry-plus.php" instead of "cactusMasonry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,334 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript610794660
PHP26086500
Sass164173
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity100.00
▷ Minimum class complexity100.00
▷ Maximum class complexity100.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods436.36%
▷ Protected methods00.00%
▷ Private methods763.64%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin