67% mw-team-gallery

Code Review | MW Team Gallery

WordPress plugin MW Team Gallery scored 67% from 54 tests.

About plugin

  • Plugin page: mw-team-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2019
  • Latest release: Sep 21, 2019
  • Number of updates: 26
  • Update frequency: every 0.1 days
  • Top authors: creativeagency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 490 total downloads

Benchmarks

Plugin footprint 65% 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.88MB] [CPU: ▼32.95ms] Passed 4 tests

A check of server-side resources used by MW Team Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.14 ▲2.54
Dashboard /wp-admin3.06 ▼0.2425.20 ▼23.18
Posts /wp-admin/edit.php3.06 ▼0.3024.18 ▼24.52
Add New Post /wp-admin/post-new.php3.06 ▼2.8326.34 ▼71.17
Media Library /wp-admin/upload.php3.06 ▼0.1722.15 ▼12.94
Add Member /wp-admin/post-new.php?post_type=mwtg_team3.0624.89
All Member /wp-admin/edit.php?post_type=mwtg_team3.0725.12
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=mwtg_team3.0723.30
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=mwtg_team3.0724.02
Options /wp-admin/edit.php?post_type=mwtg_team&page=mw-plugin-options3.0728.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
category_children
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

MW Team Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.32 ▼1.041.71 ▼0.0444.05 ▲5.39
Dashboard /wp-admin2,248 ▲605.87 ▲0.88104.07 ▼20.0141.57 ▼3.16
Posts /wp-admin/edit.php2,125 ▲361.97 ▼0.0240.68 ▲0.2636.46 ▲0.65
Add New Post /wp-admin/post-new.php1,566 ▲3323.10 ▼0.12617.27 ▼61.2248.94 ▼5.43
Media Library /wp-admin/upload.php1,430 ▲424.20 ▲0.0197.04 ▼11.1545.57 ▲3.46
Add Member /wp-admin/post-new.php?post_type=mwtg_team2,4877.75191.7270.77
All Member /wp-admin/edit.php?post_type=mwtg_team1,1441.9932.4528.76
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=mwtg_team1,3462.1430.0730.11
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=mwtg_team1,4822.1431.4933.73
Options /wp-admin/edit.php?post_type=mwtg_team&page=mw-plugin-options8522.0233.8355.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • category_children
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mwtg_team&page=mw-plugin-options
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/edit.php?post_type=mwtg_team&page=mw-plugin-options
    • > Notice in wp-content/plugins/mw-team-gallery/mw-team-gallery.php+482
    Trying to access array offset on value of type bool

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mw-team-gallery/mw-team-gallery.php:96

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png), #5 (screenshot-5.png), #6 (screenshot-6.png)
The official readme.txt is a good inspiration

mw-team-gallery/mw-team-gallery.php 85% from 13 tests

The main file in "MW Team Gallery" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 235 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin370 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110529370

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.88MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png108.03KB35.70KB▼ 66.95%
screenshot-5.png92.83KB29.17KB▼ 68.58%
screenshot-2.png135.77KB37.51KB▼ 72.37%
screenshot-1.png82.25KB23.59KB▼ 71.31%
screenshot-3.png410.82KB125.37KB▼ 69.48%