78% wp-magazine-modules-lite

Code Review | WP Magazine Modules Lite

WordPress plugin WP Magazine Modules Lite scored78%from 54 tests.

About plugin

  • Plugin page: wp-magazine-modul...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Apr 27, 2023
  • Number of updates: 17
  • Update frequency: every 56.8 days
  • Top authors: codevibrant (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

7,000+ active /74,624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.00MB] [CPU: ▲0.76ms] Passed 4 tests

Analyzing server-side resources used by WP Magazine Modules Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0646.72 ▲4.02
Dashboard /wp-admin4.30 ▲1.0053.41 ▼0.02
Posts /wp-admin/edit.php4.36 ▲0.9952.72 ▲1.99
Add New Post /wp-admin/post-new.php7.11 ▲1.2291.78 ▼1.26
Media Library /wp-admin/upload.php4.17 ▲0.9340.71 ▲2.32

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Magazine Modules Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲23913.55 ▼1.1010.98 ▲9.3271.21 ▲28.62
Dashboard /wp-admin2,257 ▲805.58 ▼0.0792.94 ▼2.3442.48 ▼2.45
Posts /wp-admin/edit.php2,164 ▲642.07 ▲0.0634.10 ▼6.9933.63 ▼4.16
Add New Post /wp-admin/post-new.php6,222 ▲4,69119.96 ▼3.07895.91 ▲213.7673.56 ▲19.96
Media Library /wp-admin/upload.php1,465 ▲624.22 ▼0.1595.50 ▼2.7840.90 ▼1.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • wpmagazine_modules_lite_upgrade_premium
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-magazine-modules-lite/includes/src/banner/layout-default/layout-default.php
    • > /wp-content/plugins/wp-magazine-modules-lite/includes/src/banner/layout-one/layout-one.php
  • 82× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-slider/layout-one/layout-one.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-filter/layout-default/layout-default.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Wpmagazine_Modules_Lite_Block_Base' not found in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-tiles/block.php:10
    • > PHP Notice
      Undefined variable: featuredSectionOption in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-tiles/layout-default/layout-default.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-tiles/layout-default/layout-default.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-grid/layout-default/layout-default.php:8
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-magazine-modules-lite/includes/src/post-list/layout-default/layout-default.php on line 5
    • > PHP Notice
      Undefined variable: titleOption in wp-content/plugins/wp-magazine-modules-lite/includes/src/banner/layout-one/layout-one.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-magazine-modules-lite/includes/src/category-collection/layout-one/layout-one.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wp-magazine-modules-lite/includes/src/ticker/element.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-magazine-modules-lite/wp-magazine-modules-lite.php 92% from 13 tests

"WP Magazine Modules Lite" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 170 characters long)

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
Everything looks great! No dangerous files found in this plugin140,248 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript897,8456,77365,919
JSON30037,679
PHP681,6161,54822,149
SVG61139,150
CSS121,933775,351

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods183
▷ Static methods1910.38%
▷ Public methods15685.25%
▷ Protected methods2614.21%
▷ Private methods10.55%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
35 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/filter-layout-two.png0.32KB0.12KB▼ 61.63%
includes/assets/images/carousel-layout-two.png0.45KB0.22KB▼ 50.43%
includes/assets/images/list-layout-one.png0.31KB0.11KB▼ 65.00%
includes/assets/images/list-layout-two.png0.34KB0.13KB▼ 61.96%
includes/assets/images/banner-layout-two.png0.32KB0.13KB▼ 60.49%