10% os-materializecss-popup

Code Review | OS Materializecss PopUp

WordPress plugin OS Materializecss PopUp scored10%from 54 tests.

About plugin

  • Plugin page: os-materializecss...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.4
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Apr 24, 2017
  • Number of updates: 5
  • Update frequency: every 88.6 days
  • Top authors: offshorent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,000 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/os-materializecss-popup/includes/admin/osmp-widget.php+90
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼56.80ms] Passed 4 tests

An overview of server-side resources used by OS Materializecss PopUp
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.83 ▼38.52
Dashboard /wp-admin2.14 ▼1.216.37 ▼50.60
Posts /wp-admin/edit.php2.14 ▼1.227.65 ▼41.46
Add New Post /wp-admin/post-new.php2.14 ▼3.755.74 ▼96.60
Media Library /wp-admin/upload.php2.14 ▼1.105.64 ▼29.40
OS PopUp /wp-admin/edit.php?post_type=osmp-popup2.145.86
Add New /wp-admin/post-new.php?post_type=osmp-popup2.147.35
About /wp-admin/edit.php?post_type=osmp-popup&page=osmp-about-developer2.146.70

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
widget_osmp_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

OS Materializecss PopUp: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲36014.79 ▲0.0518.67 ▲16.5144.26 ▼0.36
Dashboard /wp-admin2,258 ▲675.10 ▲0.03110.40 ▲7.0342.63 ▲0.65
Posts /wp-admin/edit.php2,143 ▲542.32 ▲0.3441.66 ▲1.3235.43 ▼1.98
Add New Post /wp-admin/post-new.php1,556 ▲1417.73 ▼0.70597.32 ▼19.3433.15 ▼21.88
Media Library /wp-admin/upload.php1,437 ▲464.47 ▲0.2399.52 ▲3.2642.35 ▼3.42
OS PopUp /wp-admin/edit.php?post_type=osmp-popup1,1152.2636.3926.86
Add New /wp-admin/post-new.php?post_type=osmp-popup2,4373.1588.8396.95
About /wp-admin/edit.php?post_type=osmp-popup&page=osmp-about-developer1,0311.8930.5429.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/os-materializecss-popup/includes/admin/osmp-widget.php+90
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_osmp_widget
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=osmp-popup&page=osmp-about-developer
    • > Deprecated in wp-content/plugins/os-materializecss-popup/includes/admin/osmp-widget.php+90
    Function create_function() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=osmp-popup&page=osmp-about-developer
    • > Warning in wp-content/plugins/os-materializecss-popup/includes/admin/osmp-widget.php+7
    Use of undefined constant osmp_TEXT_DOMAIN - assumed 'osmp_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=osmp-popup&page=osmp-about-developer
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in osmpWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=osmp-popup
    • > Warning in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.settings.php+39
    Use of undefined constant OSPT_TEXT_DOMAIN - assumed 'OSPT_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=osmp-popup
    • > Notice in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.designs.php+54
    Undefined variable: design
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=osmp-popup
    • > Notice in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.designs.php+54
    Trying to access array offset on value of type null

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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/templates/osmp.design-4.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/templates/osmp.design-2.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.designs.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/os-materializecss-popup/includes/admin/osmp-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/admin/meta-boxes/views/osmp.general.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/templates/osmp.design-3.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'osmpPostTypes' not found in wp-content/plugins/os-materializecss-popup/includes/templates/osmp.design-1.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (OS Materializecss PopUp - PopUp listing interface), #2 (OS Materializecss PopUp - Add new popup interface), #3 (OS Materializecss PopUp - Design 1), #4 (OS Materializecss PopUp - Design 2), #5 (OS Materializecss PopUp - Design 3), #6 (OS Materializecss PopUp - Design 4)
You can look at the official readme.txt

os-materializecss-popup/os-materializecss-popup.php Passed 13 tests

The main PHP file in "OS Materializecss PopUp" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
115 characters long description:
OS Materializecss PopUp is the colorful, responsive, customizable popup plugin for WordPress using materialize css.

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
Good job! No executable or dangerous file extensions detected2,380 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS446261,273
PHP17234360990
JavaScript53234117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.44
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods50
▷ Static methods36.00%
▷ Public methods4896.00%
▷ Protected methods00.00%
▷ Private methods24.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
9 PNG files occupy 0.34MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png22.18KB7.46KB▼ 66.38%
images/social.png1.61KB1.12KB▼ 30.45%
screenshot-2.png143.10KB45.73KB▼ 68.04%
screenshot-3.png47.64KB16.34KB▼ 65.71%
images/category.png0.48KB0.34KB▼ 28.63%