79% climate-tagger

Code Review | Climate Tagger

WordPress plugin Climate Tagger scored79%from 54 tests.

About plugin

  • Plugin page: climate-tagger
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Sep 23, 2016
  • Number of updates: 13
  • Update frequency: every 36.9 days
  • Top authors: Aptivate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,116 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼12.84MB] [CPU: ▼2,665,247.81ms] Passed 4 tests

Server-side resources used by Climate Tagger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0346.57 ▲0.37
Dashboard /wp-admin3.39 ▼51.5252.57 ▼10,660,989.13
Posts /wp-admin/edit.php3.50 ▲0.1049.96 ▼4.57
Add New Post /wp-admin/post-new.php6.01 ▲0.08597.47 ▲485.99
Media Library /wp-admin/upload.php3.31 ▲0.0440.04 ▲2.11
Climate Tagger /wp-admin/options-general.php?page=climate-tagger3.30455.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
climate_tagger_general_settings
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Climate Tagger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.23 ▼0.141.98 ▼0.0143.93 ▼0.23
Dashboard /wp-admin2,204 ▲335.63 ▼0.1488.70 ▼0.5543.50 ▲2.16
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0336.36 ▼3.3035.70 ▼2.23
Add New Post /wp-admin/post-new.php6,221 ▲4,69325.75 ▲2.44864.65 ▲163.1155.19 ▼9.88
Media Library /wp-admin/upload.php1,406 ▲94.20 ▼0.03100.20 ▼4.1940.70 ▼4.87
Climate Tagger /wp-admin/options-general.php?page=climate-tagger8711.9927.9730.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • climate_tagger_general_settings
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=climate-tagger
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=climate-tagger
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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 fix the following
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/climate-tagger/tests/define-mock-functions.php on line 2
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/climate-tagger/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function override_function() in wp-content/plugins/climate-tagger/tests/define-mock-functions.php:19
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/climate-tagger/tests/bootstrap.php on line 6
    • > PHP Notice
      Undefined variable: mock_function_args in wp-content/plugins/climate-tagger/tests/define-mock-functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function override_function() in wp-content/plugins/climate-tagger/tests/define-mock-functions.php:19
    • > PHP Warning
      require_once(climate-tagger.php): failed to open stream: No such file or directory in wp-content/plugins/climate-tagger/tests/test-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function override_function() in wp-content/plugins/climate-tagger/tests/define-mock-functions.php:19
    • > PHP Fatal error
      require_once(): Failed opening required 'climate-tagger.php' (include_path='.:/usr/share/php') in wp-content/plugins/climate-tagger/tests/test-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/climate-tagger/climate-tagger.php:317

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: suggestion, api, climate tagger, tag suggestion, tag cloud...

climate-tagger/climate-tagger.php Passed 13 tests

The entry point to "Climate Tagger" version 1.0.3 is a PHP file that has certain tags in its header comment area
59 characters long description:
Recommends tags in a tag cloud based on Climate Tagger API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected705 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP820213611
Bourne Shell115459
XML10014
YAML14012
JavaScript1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods34
▷ Static methods1338.24%
▷ Public methods3088.24%
▷ Protected methods25.88%
▷ Private methods25.88%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin