78% sm-team

Code Review | SM Team

WordPress plugin SM Team scored78%from 54 tests.

About plugin

  • Plugin page: sm-team
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Nov 27, 2017
  • Number of updates: 32
  • Update frequency: every 14.1 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,048 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.65ms] Passed 4 tests

This is a short check of server-side resources used by SM Team
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.80 ▲8.76
Dashboard /wp-admin3.40 ▲0.0953.82 ▼6.40
Posts /wp-admin/edit.php3.51 ▲0.1554.40 ▲3.79
Add New Post /wp-admin/post-new.php6.00 ▲0.1196.89 ▲9.36
Media Library /wp-admin/upload.php3.32 ▲0.0938.29 ▲0.46
Add New Team Member /wp-admin/post-new.php?post_type=sm_team3.4448.38
All Team Members /wp-admin/edit.php?post_type=sm_team3.3642.46
Settings /wp-admin/edit.php?post_type=sm_team&page=settings3.2928.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SM Team
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲21414.12 ▼0.209.82 ▲7.9037.96 ▼3.92
Dashboard /wp-admin2,263 ▲605.00 ▼0.89114.27 ▲4.3143.64 ▼0.74
Posts /wp-admin/edit.php2,137 ▲342.22 ▲0.1239.14 ▲2.0836.68 ▲3.65
Add New Post /wp-admin/post-new.php1,562 ▲3623.32 ▲5.81681.85 ▼11.2757.25 ▲3.20
Media Library /wp-admin/upload.php1,442 ▲424.41 ▲0.2597.89 ▼24.5342.48 ▼7.39
Add New Team Member /wp-admin/post-new.php?post_type=sm_team2,5217.88174.9180.92
All Team Members /wp-admin/edit.php?post_type=sm_team1,1662.1931.4531.26
Settings /wp-admin/edit.php?post_type=sm_team&page=settings8532.1327.9831.03

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 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sm-team/includes/themes/test.php
    • > /wp-content/plugins/sm-team/includes/sm_team_settings_page.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/sm-team/includes/themes/3.php:4
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/sm-team/includes/themes/3.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-team/includes/sm-team-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/sm-team/includes/themes/1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sm-team/includes/sm-team-shortcoads.php:13
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/sm-team/includes/themes/1.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/sm-team/includes/themes/2.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-team/includes/class/sm-team-post-meta.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-team/includes/class/sm-team-post-type.php:10
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/sm-team/includes/themes/default.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: Please describe screenshot #2 in sm-team/assets to your readme.txt
Please take inspiration from this readme.txt

sm-team/sm-team.php Passed 13 tests

Analyzing the main PHP file in "SM Team" version 2.0.0
59 characters long description:
A wordpress plugin for manage and display team member list.

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 plugin7,816 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS334386,999
PHP126936722
JavaScript2343195

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
11 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/web.png2.60KB1.80KB▼ 30.78%
img/web2.png0.68KB0.43KB▼ 35.69%
img/twitter.png17.95KB0.91KB▼ 94.91%
img/google-plus.png17.95KB0.76KB▼ 95.77%
img/beshto.png1.80KB1.53KB▼ 15.24%