10% tmb-adn-embed-and-widget

Code Review | TMB App.net Embed and Widget

WordPress plugin TMB App.net Embed and Widget scored10%from 54 tests.

About plugin

  • Plugin page: tmb-adn-embed-and...
  • Plugin version: 0.1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2012
  • Latest release: Mar 1, 2013
  • Number of updates: 13
  • Update frequency: every 10.3 days
  • Top authors: th0masmb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,966 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; TMB_ADN_Widget has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼49.95ms] Passed 4 tests

An overview of server-side resources used by TMB App.net Embed and Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.364.46 ▼33.39
Dashboard /wp-admin2.13 ▼1.178.00 ▼36.60
Posts /wp-admin/edit.php2.13 ▼1.238.08 ▼40.82
Add New Post /wp-admin/post-new.php2.13 ▼3.764.91 ▼89.00
Media Library /wp-admin/upload.php2.13 ▼1.106.46 ▼29.78
TMB ADN /wp-admin/options-general.php?page=tmb-adn2.135.13

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
tmb_adn_options
widget_recent-posts
widget_tmb-adn-widget
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by TMB App.net Embed and Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.29 ▼1.361.81 ▲0.0238.70 ▼1.00
Dashboard /wp-admin2,210 ▲354.86 ▼0.09115.86 ▼3.2242.79 ▼0.00
Posts /wp-admin/edit.php2,096 ▲42.00 ▼0.0141.25 ▲0.3037.99 ▲0.48
Add New Post /wp-admin/post-new.php1,536 ▼623.29 ▲5.11648.47 ▲40.3961.72 ▲2.45
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0295.18 ▼9.3742.34 ▼1.92
TMB ADN /wp-admin/options-general.php?page=tmb-adn9012.0424.0627.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; TMB_ADN_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_tmb-adn-widget
    • can_compress_scripts
    • tmb_adn_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; TMB_ADN_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/widget.php+82
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/scb/load.php+77
    Non-static method TMB_ADN::admin_init() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > Deprecated in wp-content/plugins/tmb-adn-embed-and-widget/tmb-adn.php+95
    Non-static method TMB_ADN::_get_options() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TMB_ADN_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tmb-adn
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tmb-adn-embed-and-widget/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tmb-adn-embed-and-widget/scb/Widget.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/tmb-adn-embed-and-widget/uninstall.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tmb-adn-embed-and-widget/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/tmb-adn-embed-and-widget/uninstall.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/tmb-adn-embed-and-widget/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/tmb-adn-embed-and-widget/scb/BoxesPage.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: adn, widget, appnet, social, embed...

tmb-adn-embed-and-widget/tmb-adn.php 92% from 13 tests

Analyzing the main PHP file in "TMB App.net Embed and Widget" version 0.1.4.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tmb-adn-embed-and-widget.php" instead of "tmb-adn.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,788 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP146132991,667
CSS215077
JavaScript215044

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.61
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes22
▷ Abstract classes522.73%
▷ Concrete classes1777.27%
▷ Final classes00.00%
Methods171
▷ Static methods5934.50%
▷ Public methods13981.29%
▷ Protected methods2313.45%
▷ Private methods95.26%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin