66% amo-team-showcase

Code Review | AMO Team Showcase

WordPress plugin AMO Team Showcase scored66%from 54 tests.

About plugin

  • Plugin page: amo-team-showcase
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2017
  • Latest release: Dec 13, 2017
  • Number of updates: 53
  • Update frequency: every 6.1 days
  • Top authors: amothemo (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /37,787 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: ▲0.32MB] [CPU: ▼2.15ms] Passed 4 tests

A check of server-side resources used by AMO Team Showcase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2641.85 ▲1.68
Dashboard /wp-admin3.68 ▲0.3746.16 ▼0.83
Posts /wp-admin/edit.php3.73 ▲0.3849.26 ▲1.49
Add New Post /wp-admin/post-new.php6.22 ▲0.3487.68 ▼10.93
Media Library /wp-admin/upload.php3.55 ▲0.3239.72 ▲4.80
Options /wp-admin/edit.php?post_type=amo-team&page=amo-team-options3.6539.59
Add New Member /wp-admin/post-new.php?post_type=amo-team3.7949.65
Categories /wp-admin/edit-tags.php?taxonomy=amo-team-category&post_type=amo-team3.5436.16
All Members /wp-admin/edit.php?post_type=amo-team3.5943.57

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 133 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_amoteam-team-members
db_upgraded
widget_recent-comments
amo-team-showcase-system
theysaidso_admin_options
amo-team-showcase-css-styles
amo-team-showcase-options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AMO Team Showcase
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲12913.25 ▼1.071.98 ▲0.1743.19 ▲6.37
Dashboard /wp-admin2,271 ▲865.85 ▼0.09100.62 ▼8.6647.86 ▲6.10
Posts /wp-admin/edit.php2,158 ▲692.05 ▲0.0038.82 ▲3.2536.94 ▲6.36
Add New Post /wp-admin/post-new.php1,577 ▲5723.30 ▲0.07670.83 ▲1.1556.28 ▼9.57
Media Library /wp-admin/upload.php1,457 ▲724.31 ▲0.0798.78 ▼5.8045.94 ▼0.83
Options /wp-admin/edit.php?post_type=amo-team&page=amo-team-options2,8375.15158.9448.01
Add New Member /wp-admin/post-new.php?post_type=amo-team2,8577.73182.0378.72
Categories /wp-admin/edit-tags.php?taxonomy=amo-team-category&post_type=amo-team1,3422.3430.6031.05
All Members /wp-admin/edit.php?post_type=amo-team1,1631.9933.3132.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_amoteam-team-members
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=amo-team
    • > Warning in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/group.view.php+43
    Illegal string offset 'social-icon-blocks'
    • > GET request to /wp-admin/post-new.php?post_type=amo-team
    • > Notice in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/group.view.php+20
    Array to string conversion
    • > GET request to /wp-admin/post-new.php?post_type=amo-team
    • > Warning in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/group.view.php+43
    Invalid argument supplied for foreach()

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 take a closer look at the following
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/amo-team-showcase/admin/partials/specific/notice-general.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/close-elem.view.php
    • > /wp-content/plugins/amo-team-showcase/public/partials/sc-skills.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/sub-views/options-page/nav-tabs.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/sub-views/general/post-list-thumb.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/section-heading.view.php
    • > /wp-content/plugins/amo-team-showcase/public/partials/sc-text-block.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/specific/ajax-loader.view.php
    • > /wp-content/plugins/amo-team-showcase/public/partials/sc-skills-single.view.php
    • > /wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/tab-pane-open.view.php
  • 151× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/amo-team-showcase/public/partials/panel.view.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/amo-team-showcase/admin/amo-team-showcase-admin-enqueue.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/group.view.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/social-icons.view.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/close-elem.view.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/amo-team-showcase/public/partials/panel.view.php on line 45
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/amo-team-showcase/public/partials/tile-styles/general.view.php on line 40
    • > PHP Notice
      Undefined index: tab-id in wp-content/plugins/amo-team-showcase/admin/partials/sub-views/form-parts/tab-pane-open.view.php on line 15
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/amo-team-showcase/admin/partials/specific/notice-general.view.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _ex() in wp-content/plugins/amo-team-showcase/public/partials/panel.view.php:50

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=amo-team&page=amo-team-options
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=amo-team&page=amo-team-options
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=amo-team&page=amo-team-options
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=amo-team&page=amo-team-options
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (35 tag instead of maximum 10)
Please take inspiration from this readme.txt

amo-team-showcase/amo-team-showcase.php 92% from 13 tests

The principal PHP file in "AMO Team Showcase" v. 1.1.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin9,792 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
CSS8754753,052
PHP498281,6372,708
LESS347955672,186
JavaScript103083781,038
PO File1259431729
SVG335071
XML1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.45
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods85
▷ Static methods910.59%
▷ Public methods7588.24%
▷ Protected methods00.00%
▷ Private methods1011.76%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/image-placeholder.png3.34KB0.16KB▼ 95.17%