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: 6.3.1
  • 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

200+ active / 36,648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.69ms] 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.48 ▲0.0238.46 ▼5.19
Dashboard /wp-admin3.33 ▲0.0345.09 ▼6.22
Posts /wp-admin/edit.php3.38 ▲0.0346.18 ▲0.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.39 ▼4.02
Media Library /wp-admin/upload.php3.26 ▲0.0343.35 ▲9.38
Autocode /wp-admin/options-general.php?page=twomb-autocode-settings3.2230.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
2mb_autocode_bottomtype
2mb_autocode_topstring
2mb_autocode_toptype
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
2mb_autocode_tophome
...

Browser metrics Passed 4 tests

An overview of browser requirements for 2MB Autocode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.44 ▲0.092.33 ▲0.5039.24 ▼4.81
Dashboard /wp-admin2,213 ▲255.85 ▲0.0294.12 ▼7.8937.38 ▼6.26
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0439.64 ▲4.7837.19 ▲1.17
Add New Post /wp-admin/post-new.php6,525 ▲4,99120.40 ▼2.83916.22 ▲259.1257.53 ▲4.59
Media Library /wp-admin/upload.php1,392 ▲14.26 ▲0.06109.28 ▲14.6948.59 ▲5.95
Autocode /wp-admin/options-general.php?page=twomb-autocode-settings8851.8427.1131.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 12 options in the database
    • widget_theysaidso_widget
    • 2mb_autocode_bottomtype
    • 2mb_autocode_bottomhome
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • 2mb_autocode_bottomstring
    • widget_recent-comments
    • widget_recent-posts
    • 2mb_autocode_tophome
    • ...

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 errors 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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: modify posts, preformatted text, code placement, html, php...

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

This is the main PHP file of "2MB Autocode" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected447 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22310447

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected