94% a-better-planet

Code Review | A Better Planet

WordPress plugin A Better Planet scored 94% from 54 tests.

About plugin

  • Plugin page: a-better-planet
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.6
  • WordPress version: 5.9.2
  • First release: May 21, 2013
  • Latest release: May 22, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: themefurnace (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,975 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼298.88ms] Passed 4 tests

Server-side resources used by A Better Planet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.58 ▲3.22
Dashboard /wp-admin3.44 ▲0.04687.55 ▲654.01
Posts /wp-admin/edit.php3.64 ▲0.0037.28 ▼1.93
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.48 ▼1,196.33
Media Library /wp-admin/upload.php3.30 ▲0.0023.17 ▼0.46

Server storage [IO: ▲0.02MB] [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, no new options

Browser metrics Passed 4 tests

A Better Planet: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲8916.18 ▲0.516.03 ▲0.513.01 ▲0.25
Dashboard /wp-admin2,940 ▲796.17 ▼0.03121.65 ▼8.93159.48 ▲5.09
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0063.39 ▼1.76144.69 ▼8.74
Add New Post /wp-admin/post-new.php1,661 ▼717.22 ▼0.71411.29 ▲5.16151.25 ▼2.80
Media Library /wp-admin/upload.php1,698 ▼05.55 ▼0.01143.39 ▲9.91187.42 ▲5.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a-better-planet/a-better-planet.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/a-better-planet/feed.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, news, wordpress, dashboard

a-better-planet/a-better-planet.php Passed 13 tests

"A Better Planet" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
All the latest WordPress News from Quality Sources

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected35 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP281335

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin