83% claimit

Code Review | ClaimIt Webmaster Tools

WordPress plugin ClaimIt Webmaster Tools scored83%from 54 tests.

About plugin

  • Plugin page: claimit
  • Plugin version: 2.0.5
  • PHP compatiblity: 4.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 14, 2013
  • Latest release: Feb 24, 2018
  • Number of updates: 24
  • Update frequency: every 67.7 days
  • Top authors: Petrichorpost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /3,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.65ms] Passed 4 tests

Analyzing server-side resources used by ClaimIt Webmaster Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.34 ▼5.14
Dashboard /wp-admin3.36 ▲0.0651.46 ▲1.22
Posts /wp-admin/edit.php3.41 ▲0.0646.33 ▼11.20
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.52 ▼12.74
Media Library /wp-admin/upload.php3.29 ▲0.0634.44 ▼1.50
Webmaster /wp-admin/options-general.php?page=claimit3.2530.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 16 new options
New WordPress options
claimit_webutation_webmaster
claimit_footer_section
claimit_body_section
claimit_pinterest
claimit_bing_webmaster
claimit_google_submit_button
theysaidso_admin_options
widget_theysaidso_widget
claimit_weboftrust_webmaster
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for ClaimIt Webmaster Tools
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4413.95 ▼0.401.67 ▲0.0143.82 ▲5.12
Dashboard /wp-admin2,199 ▲225.56 ▼0.1186.52 ▼3.3739.89 ▼2.96
Posts /wp-admin/edit.php2,104 ▲11.97 ▼0.0335.07 ▼5.0832.97 ▼6.00
Add New Post /wp-admin/post-new.php1,531 ▲523.02 ▼0.59629.97 ▼28.5351.42 ▼13.10
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0997.75 ▼2.6945.74 ▼0.42
Webmaster /wp-admin/options-general.php?page=claimit1,0332.1325.6345.08

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 16 options in the database
    • claimit_body_section
    • claimit_webutation_webmaster
    • claimit_google_webmaster
    • claimit_pinterest
    • widget_theysaidso_widget
    • claimit_yandex_webmaster
    • can_compress_scripts
    • claimit_google_submit_button
    • claimit_footer_section
    • db_upgraded
    • ...

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/claimit/claimit.php on line 36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/claimit/claimit.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Webmaster page for claiming your website.), #2 (Add custom html to the header, footer and after the body tag.), #3 (Fetch as Google button.)
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

claimit/claimit.php 92% from 13 tests

The main PHP file in "ClaimIt Webmaster Tools" ver. 2.0.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin308 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19430308

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png17.32KB8.05KB▼ 53.53%
screenshot-1.png40.63KB22.67KB▼ 44.20%
screenshot-3.png6.18KB3.97KB▼ 35.88%