78% amd

Code Review | Amd

WordPress plugin Amd scored78%from 54 tests.

About plugin

  • Plugin page: amd
  • Plugin version: 1.05
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Jun 8, 2017
  • Latest release: Oct 22, 2018
  • Number of updates: 28
  • Update frequency: every 17.9 days
  • Top authors: adpu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,361 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
Installer ran successfully

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

An overview of server-side resources used by Amd
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0834.53 ▼6.82
Dashboard /wp-admin3.38 ▲0.0848.59 ▼4.30
Posts /wp-admin/edit.php3.50 ▲0.1450.83 ▼1.07
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.46 ▼14.00
Media Library /wp-admin/upload.php3.31 ▲0.0836.22 ▲0.09
Scan Meta tags /wp-admin/options-general.php?page=scan-meta-tags3.3144.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Amd: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.35 ▼0.182.12 ▲0.4542.19 ▼0.58
Dashboard /wp-admin2,206 ▲295.62 ▲0.0984.29 ▼16.6341.38 ▼1.61
Posts /wp-admin/edit.php2,108 ▲51.97 ▼0.0435.98 ▼0.8336.58 ▲1.15
Add New Post /wp-admin/post-new.php6,277 ▲4,73925.99 ▲3.00875.87 ▲190.5554.37 ▲2.12
Media Library /wp-admin/upload.php1,408 ▲54.19 ▼0.0797.23 ▼5.7744.10 ▼4.28
Scan Meta tags /wp-admin/options-general.php?page=scan-meta-tags9151.9922.2034.86

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/amd/admin/partials/amd_create_scan_meta_content.php
    • > /wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php
    • > /wp-content/plugins/amd/admin/partials/amd_scan_meta_content_posts.php
  • 57× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: amd_page_title_tag_lenght_exceed in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 11
    • > PHP Notice
      Trying to get property 'publish' of non-object in wp-content/plugins/amd/admin/partials/amd_create_scan_meta_content.php on line 16
    • > PHP Notice
      Undefined variable: amd_page_meta_description_empty in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 14
    • > PHP Notice
      Undefined variable: amd_page_title_tag_duplicated in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 11
    • > PHP Notice
      Undefined variable: current_page in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 85
    • > PHP Notice
      Undefined variable: current_page in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_posts.php on line 85
    • > PHP Notice
      Undefined variable: amd_page_title_tag_empty in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 11
    • > PHP Notice
      Undefined variable: amd_page_meta_description_duplicated in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 14
    • > PHP Notice
      Undefined variable: active_tab in wp-content/plugins/amd/admin/partials/amd_create_scan_meta_content.php on line 15
    • > PHP Notice
      Undefined variable: amd_page_meta_description_lenght_exceed in wp-content/plugins/amd/admin/partials/amd_scan_meta_content_pages.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: scan meta title, test meta tags, test meta title, title tag, meta title...

amd/amd.php 92% from 13 tests

This is the main PHP file of "Amd" version 1.05, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected542 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP15150568467
CSS10456
JavaScript14019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin