84% 2mb-autocode

Code Review | 2MB Autocode

WordPress plugin 2MB Autocode scored 84% from 54 tests.

About plugin

  • Plugin page: 2mb-autocode
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 5.9.2
  • First release: Sep 8, 2014
  • Latest release: Feb 6, 2021
  • Number of updates: 24
  • Update frequency: every 97.6 days
  • Top authors: lilmike (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 34,858 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.07MB] [CPU: ▼298.98ms] Passed 4 tests

A check of server-side resources used by 2MB Autocode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1558.65 ▲4.55
Dashboard /wp-admin3.51 ▲0.1035.46 ▼0.55
Posts /wp-admin/edit.php3.73 ▲0.0943.36 ▲5.16
Add New Post /wp-admin/post-new.php6.97 ▲0.0094.86 ▼1,202.42
Media Library /wp-admin/upload.php3.39 ▲0.0926.51 ▲2.50
Autocode /wp-admin/options-general.php?page=twomb-autocode-settings3.3522.76

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
2mb_autocode_bottomhome
2mb_autocode_topstring
2mb_autocode_bottomtype
2mb_autocode_toptype
2mb_autocode_tophome
2mb_autocode_bottomstring

Browser metrics Passed 4 tests

Checking browser requirements for 2MB Autocode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7816.14 ▲0.325.71 ▼0.783.27 ▲0.97
Dashboard /wp-admin2,894 ▲366.12 ▼0.08129.59 ▼19.62192.37 ▲18.35
Posts /wp-admin/edit.php2,693 ▲93.24 ▼0.0169.24 ▼2.07151.96 ▼38.87
Add New Post /wp-admin/post-new.php1,758 ▲9717.18 ▲1.14416.10 ▼5.54222.65 ▼2.05
Media Library /wp-admin/upload.php1,706 ▲85.56 ▲0.00144.68 ▼3.78274.44 ▲33.81
Autocode /wp-admin/options-general.php?page=twomb-autocode-settings1,1872.5257.60132.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • 2mb_autocode_tophome
    • 2mb_autocode_bottomstring
    • 2mb_autocode_bottomtype
    • 2mb_autocode_bottomhome
    • 2mb_autocode_topstring
    • 2mb_autocode_toptype

Smoke tests 75% 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 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/2mb-autocode/2mb-autocode.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: html, autocode, php, automatic, code placement...

2mb-autocode/2mb-autocode.php Passed 13 tests

"2MB Autocode" version 1.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
105 characters long description:
This plugin allows you to place predetermined text, php, or shortcodes at the top and/or bottom of posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin447 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22310447

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected