10% photography-glossary

Code Review | Photography Glossary

WordPress plugin Photography Glossary scored10%from 54 tests.

About plugin

  • Plugin page: photography-glossary
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Sep 5, 2013
  • Number of updates: 12
  • Update frequency: every 24.6 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,023 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/photography-glossary/index.php+182
    syntax error, unexpected end of file

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

This is a short check of server-side resources used by Photography Glossary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.37 ▼4.03
Dashboard /wp-admin3.31 ▲0.0044.99 ▼4.41
Posts /wp-admin/edit.php3.36 ▲0.0048.90 ▲1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.36 ▲3.18
Media Library /wp-admin/upload.php3.23 ▲0.0032.18 ▼4.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Photography Glossary
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.15 ▼1.601.76 ▲0.1047.40 ▼2.84
Dashboard /wp-admin2,206 ▲154.80 ▼1.10101.76 ▼1.8940.87 ▲2.17
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0040.33 ▼0.6134.06 ▼2.76
Add New Post /wp-admin/post-new.php1,534 ▲123.10 ▲0.04677.70 ▲36.9757.05 ▲0.74
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0299.97 ▲2.5942.47 ▲2.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/photography-glossary/index.php on line 182

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: photography dictionary, photo terms, photo definitions, photo dictionary, free...

photography-glossary/index.php 85% from 13 tests

The primary PHP file in "Photography Glossary" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("photography-glossary.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected134 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12325134

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin