84% module-positions

Code Review | Module Positions

WordPress plugin Module Positions scored84%from 54 tests.

About plugin

  • Plugin page: module-positions
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 6.3.1
  • First release: Jan 5, 2013
  • Latest release: Jul 12, 2014
  • Number of updates: 66
  • Update frequency: every 8.4 days
  • Top authors: philippkuehn (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /11,099 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Module Positions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.46 ▼6.01
Dashboard /wp-admin3.40 ▲0.0647.90 ▼21.48
Posts /wp-admin/edit.php3.52 ▲0.1648.93 ▼6.69
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.33 ▼11.23
Media Library /wp-admin/upload.php3.33 ▲0.1038.96 ▲4.80
Module Positions /wp-admin/admin.php?page=modulepositions_positions3.2935.34
Content /wp-admin/edit.php?post_type=modulepositions3.3738.88
Module Positions /wp-admin/options-general.php?page=modulepositions_settings3.2934.82

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
module_positions_positions
db_upgraded
widget_recent-posts
widget_module_positions_widget
module_positions_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Module Positions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8713.81 ▼0.571.63 ▼0.2842.19 ▼1.70
Dashboard /wp-admin2,251 ▲485.84 ▲0.98104.55 ▼13.5139.84 ▼4.31
Posts /wp-admin/edit.php2,137 ▲372.23 ▲0.1936.48 ▼0.8034.12 ▼3.02
Add New Post /wp-admin/post-new.php1,554 ▲2817.60 ▼0.01682.78 ▲28.9152.35 ▲4.40
Media Library /wp-admin/upload.php1,427 ▲274.28 ▲0.01104.41 ▼0.0548.49 ▲4.04
Module Positions /wp-admin/admin.php?page=modulepositions_positions8781.8336.3929.55
Content /wp-admin/edit.php?post_type=modulepositions1,1292.1733.0830.02
Module Positions /wp-admin/options-general.php?page=modulepositions_settings8901.8228.8734.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_module_positions_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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/module-positions/module-positions-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/module-positions/module-positions-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/module-positions/module-positions-js.php:12

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

module-positions/module-positions.php Passed 13 tests

This is the main PHP file of "Module Positions" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
83 characters long description:
This Plugin for WordPress is an simplified equivalent to Joomla's module positions.

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
Success! There were no dangerous files found in this plugin1,706 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP43411841,130
CSS1614326
PO File2100206250

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity113.50
▷ Minimum class complexity7.00
▷ Maximum class complexity220.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
4 PNG files occupy 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-order.png2.83KB0.16KB▼ 94.45%
img/icon-subs.png17.75KB0.79KB▼ 95.56%
img/icon-open.png17.35KB0.17KB▼ 99.03%
img/icon-edit.png7.45KB2.73KB▼ 63.34%