84% nature-inspiration

Code Review | Nature Inspiration

WordPress plugin Nature Inspiration scored84%from 54 tests.

About plugin

  • Plugin page: nature-inspiration
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Jul 16, 2015
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: shanarelle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /572 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.27ms] Passed 4 tests

A check of server-side resources used by Nature Inspiration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.20 ▲2.87
Dashboard /wp-admin3.34 ▲0.0344.77 ▼6.68
Posts /wp-admin/edit.php3.39 ▲0.0344.15 ▼6.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.26 ▼16.07
Media Library /wp-admin/upload.php3.26 ▲0.0334.80 ▲0.60

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_insp_widget
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Nature Inspiration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.26 ▼1.011.99 ▼0.1539.28 ▼9.77
Dashboard /wp-admin2,209 ▲185.85 ▲0.93102.75 ▼13.6240.96 ▼6.74
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0236.27 ▼2.4833.36 ▼0.13
Add New Post /wp-admin/post-new.php1,514 ▼1917.41 ▼6.01672.98 ▼8.6656.40 ▼0.82
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0294.20 ▼12.3942.48 ▼4.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_insp_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nature-inspiration/nature-inspiration.php:35

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

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: images, widget, inspiration, photos, popup...

nature-inspiration/nature-inspiration.php Passed 13 tests

"Nature Inspiration" version 0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Accepts a set of likes and searches 500px for an image in some

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
There were no executable files found in this plugin214 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11952123
CSS15041
JavaScript17628
Markdown19022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin