72% multi-author-adsense

Code Review | Multi-Author AdSense

WordPress plugin Multi-Author AdSense scored 72% from 54 tests.

About plugin

  • Plugin page: multi-author-adsense
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Jun 6, 2015
  • Number of updates: 6
  • Update frequency: every 17.5 days
  • Top authors: The Plugin Factory (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,991 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.02MB] [CPU: ▼5.91ms] Passed 4 tests

A check of server-side resources used by Multi-Author AdSense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.61 ▼7.69
Dashboard /wp-admin3.33 ▲0.0244.86 ▼5.51
Posts /wp-admin/edit.php3.44 ▲0.0847.23 ▲3.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.09 ▼9.44
Media Library /wp-admin/upload.php3.25 ▲0.0234.34 ▼1.01
Help /wp-admin/admin.php?page=multi-author-adsense-help3.2429.92
Settings /wp-admin/admin.php?page=multi-author-adsense3.3831.93

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
maa_settings
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Multi-Author AdSense: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.20 ▼1.171.53 ▼0.2240.24 ▼3.00
Dashboard /wp-admin2,235 ▲474.94 ▼0.9695.32 ▼21.6375.17 ▲34.67
Posts /wp-admin/edit.php2,112 ▲261.99 ▼0.0134.12 ▼1.0732.03 ▼0.44
Add New Post /wp-admin/post-new.php1,554 ▲2618.21 ▲0.07670.17 ▲78.0660.74 ▲5.82
Media Library /wp-admin/upload.php1,414 ▲324.22 ▲0.03101.92 ▲4.9647.54 ▲5.49
Help /wp-admin/admin.php?page=multi-author-adsense-help8792.0123.4530.69
Settings /wp-admin/admin.php?page=multi-author-adsense3,0251.8628.4531.31

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • maa_settings
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=multi-author-adsense
    • > Notice in wp-content/plugins/multi-author-adsense/options.php+298
    Undefined index: ad_alignment

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/multi-author-adsense/admin_functions.php
    • > /wp-content/plugins/multi-author-adsense/options.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-author-adsense/profile.php:919
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multi-author-adsense/index.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/multi-author-adsense/admin_functions.php:203
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/multi-author-adsense/admin_functions.php:203
    • > PHP Notice
      Undefined variable: MAA_vars in wp-content/plugins/multi-author-adsense/admin_functions.php on line 202
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-author-adsense/pro.php:450
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/multi-author-adsense/admin_functions.php on line 202
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/multi-author-adsense/admin_functions.php on line 202
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/multi-author-adsense/help.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Admin Options Page. Enter your AdSense publisher ID on the top line, and any ads you want displayed below. (screenshot.png)), #2 (Pro Options Page. Pro options include custom shortcode, auto insert Multi-Author AdSense into posts, and a responsive widget. (screenshot_pro.png)), #3 (User Settings. Authors set up their settings right on the profile page. (profile.png))
The official readme.txt is a good inspiration

multi-author-adsense/index.php 92% from 13 tests

Analyzing the main PHP file in "Multi-Author AdSense" version 1.0
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("multi-author-adsense.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,686 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP65663883,010
CSS16517387
JavaScript31432289

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity130.00
▷ Minimum class complexity130.00
▷ Maximum class complexity130.00
Average method complexity7.45
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
7 PNG files occupy 0.29MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/maa_help.png58.02KB17.72KB▼ 69.46%
images/MAA.png134.80KB44.39KB▼ 67.07%
images/maa32.png4.79KB1.56KB▼ 67.41%
images/maa64.png10.55KB3.03KB▼ 71.30%
images/maa16.png1.02KB0.97KB▼ 5.34%