84% mam-amp-slider

Code Review | Moveahead Media AMP Slider

WordPress plugin Moveahead Media AMP Slider scored84%from 54 tests.

About plugin

  • Plugin page: mam-amp-slider
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2019
  • Latest release: Jan 17, 2020
  • Number of updates: 7
  • Update frequency: every 17.3 days
  • Top authors: alisal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /644 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.26ms] Passed 4 tests

Server-side resources used by Moveahead Media AMP Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.07 ▲1.53
Dashboard /wp-admin3.34 ▲0.0441.77 ▼5.22
Posts /wp-admin/edit.php3.40 ▲0.0444.07 ▼3.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.38 ▼7.06
Media Library /wp-admin/upload.php3.27 ▲0.0432.36 ▼1.58
All AMP Sliders /wp-admin/edit.php?post_type=mamps-ampslider3.3143.28
Add New /wp-admin/post-new.php?post_type=mamps-ampslider3.3845.09

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Moveahead Media AMP Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12713.88 ▼0.4722.26 ▲20.6536.92 ▼8.31
Dashboard /wp-admin2,224 ▲445.70 ▲0.0686.97 ▼3.3438.95 ▼0.15
Posts /wp-admin/edit.php2,129 ▲292.01 ▼0.0236.27 ▲0.5031.16 ▼4.29
Add New Post /wp-admin/post-new.php1,551 ▲2522.89 ▼0.87588.17 ▼73.4067.01 ▲5.02
Media Library /wp-admin/upload.php1,432 ▲324.30 ▲0.1396.84 ▲4.7041.76 ▼2.28
All AMP Sliders /wp-admin/edit.php?post_type=mamps-ampslider1,0931.9831.1231.55
Add New /wp-admin/post-new.php?post_type=mamps-ampslider2,3307.63175.9070.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mam-amp-slider/mam-amp-slider.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("paypal.me/Peace71")
You can look at the official readme.txt

mam-amp-slider/mam-amp-slider.php Passed 13 tests

The entry point to "Moveahead Media AMP Slider" version 1.1 is a PHP file that has certain tags in its header comment area
87 characters long description:
Create custom AMP slider for every page easily. (This Plugin Require ACF Pro installed)

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
No dangerous file extensions were detected739 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11427398
JSON100299
Markdown111039
JavaScript1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin