84% anecdata-recent-project-photos

Code Review | Anecdata Recent Project Photos

WordPress plugin Anecdata Recent Project Photos scored 84% from 54 tests.

About plugin

  • Plugin page: anecdata-recent-p...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 5.9.2
  • First release: Jan 5, 2015
  • Latest release: Jan 9, 2015
  • Number of updates: 13
  • Update frequency: every 0.3 days
  • Top authors: Anecdata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼303.70ms] Passed 4 tests

Analyzing server-side resources used by Anecdata Recent Project Photos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0654.43 ▲0.75
Dashboard /wp-admin3.43 ▲0.0333.02 ▲0.57
Posts /wp-admin/edit.php3.67 ▲0.0338.90 ▼10.57
Add New Post /wp-admin/post-new.php6.91 ▼0.0694.54 ▼1,197.11
Media Library /wp-admin/upload.php3.32 ▲0.0223.64 ▼7.69

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_anecdata_sidebar_photo_widget

Browser metrics Passed 4 tests

Anecdata Recent Project Photos: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,870 ▲14816.57 ▲0.908.60 ▲3.042.27 ▼0.07
Dashboard /wp-admin2,888 ▲276.21 ▼0.05121.57 ▼10.77176.08 ▲17.47
Posts /wp-admin/edit.php2,685 ▼53.23 ▼0.0161.48 ▼2.68137.86 ▼4.94
Add New Post /wp-admin/post-new.php1,760 ▲5022.61 ▲0.82414.14 ▼15.35155.49 ▼2.48
Media Library /wp-admin/upload.php1,698 ▼35.53 ▲0.01139.94 ▼9.73208.46 ▲18.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_anecdata_sidebar_photo_widget

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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/anecdata-recent-project-photos/anecdata-project-photos-widget.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: environmental science, photos, citizen science, data collection, environment...

anecdata-recent-project-photos/anecdata-project-photos-widget.php 92% from 13 tests

"Anecdata Recent Project Photos" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("anecdata-recent-project-photos.php" instead of "anecdata-project-photos-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11934107
CSS10038

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin